Created
January 28, 2020 09:38
-
-
Save CyberBison/4e92304980189aefc309ae936107e8bb to your computer and use it in GitHub Desktop.
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
override func viewDidLoad() { | |
previewView = UIView(frame: CGRect(x:0, y:0, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height)) | |
previewView.contentMode = UIView.ContentMode.scaleAspectFit | |
view.addSubview(previewView) | |
cameraController.prepare {(error) in | |
if let error = error { | |
print(error) | |
} | |
try? self.cameraController.displayPreview(on: self.previewView) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment