开发者

show ipad2 camera in fullscreen?

开发者 https://www.devze.com 2023-02-20 01:09 出处:网络
I want to show UIImagePickerController in fullscreen mode for iPad2. presentModalViewController: appears not work for me.

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

精彩评论

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