开发者

show ipad2 camera in fullscreen?

I want to show UIImagePickerController in fullscreen mode for iPad2. presentModalViewController: appears not work for me. It show the frame with capture button but not show video preview of what is being capture?

Anyone got same problem before and now how开发者_如何学Python to solve?

Thanks


Use the AVFoundation framework, the AVCaptureVideoPreviewLayer can then be set to full screen.


This works for me:

UIImagePickerController *controller = [[UIImagePickerController alloc] init];
controller.sourceType = UIImagePickerControllerSourceTypeCamera;
controller.allowsEditing = NO;
controller.delegate = self;
[self presentModalViewController:controller animated:YES];

Note that self is the current view controller.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜