Skip to content

Instantly share code, notes, and snippets.

@TheNorthEestern
Created August 22, 2017 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheNorthEestern/ce97bdebf8f33ca78d2719df879102ed to your computer and use it in GitHub Desktop.
Save TheNorthEestern/ce97bdebf8f33ca78d2719df879102ed to your computer and use it in GitHub Desktop.
class ViewController: UIViewController, ARSCNViewDelegate {
// Rest of class code goes above here ...
func session(_ session: ARSession, cameraDidChangeTrackingState camera: ARCamera) {
var status = "Loading..."
switch camera.trackingState {
case .notAvailable:
status = "Not available"
case .limited(_):
status = "Analyzing..."
case .normal:
status = "Ready"
}
infoLabel.text = status
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment