Created
March 4, 2019 14:41
-
-
Save giln/3267875a8557fa923880e3834b374fdb to your computer and use it in GitHub Desktop.
Preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var previewView = UIImageView() | |
// MARK: - Lifecycle | |
override func loadView() { | |
super.loadView() | |
view = sceneView | |
// Create a session configuration | |
let configuration = ARWorldTrackingConfiguration() | |
// We want to receive the frames from the video | |
sceneView.session.delegate = self | |
// Run the session with the configuration | |
sceneView.session.run(configuration) | |
view.addSubview(previewView) | |
previewView.translatesAutoresizingMaskIntoConstraints = false | |
previewView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true | |
previewView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment