Skip to content

Instantly share code, notes, and snippets.

@iannase
Created November 5, 2018 15:10
Show Gist options
  • Save iannase/b7972e4f7bfd26c942b245f3839363a7 to your computer and use it in GitHub Desktop.
Save iannase/b7972e4f7bfd26c942b245f3839363a7 to your computer and use it in GitHub Desktop.
Basic ARKit ViewController
import UIKit
import ARKit
class ARViewController: UIViewController, ARSCNViewDelegate {
@IBOutlet weak var sceneView: ARSCNView!
override func viewDidLoad() {
super.viewDidLoad()
sceneView.delegate = self
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let configuration = ARWorldTrackingConfiguration()
sceneView.session.run(configuration)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment