Created
December 2, 2014 00:11
-
-
Save cloudwalking/f93d21200f88d2b82873 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
UIView *videoView = [[UIView alloc] init]; | |
... | |
AVCaptureSession *session = [[AVCaptureSession alloc] init]; | |
AVCaptureVideoPreviewLayer *previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session]; | |
previewLayer.frame = videoView.bounds; | |
[videoView.layer addSublayer:previewLayer]; | |
[session startRunning]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment