Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created June 6, 2018 16:21
Show Gist options
  • Save azamsharp/c634034a82cbfd6d064ab09fdbede98e to your computer and use it in GitHub Desktop.
Save azamsharp/c634034a82cbfd6d064ab09fdbede98e to your computer and use it in GitHub Desktop.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// Create a session configuration
let configuration = ARImageTrackingConfiguration()
guard let referenceImages = ARReferenceImage.referenceImages(inGroupNamed: "AR Resources", bundle: nil) else {
fatalError("Missing expected asset catalog resources.")
}
configuration.trackingImages = referenceImages
// Run the view's session
sceneView.session.run(configuration)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment