1
我想表明UIImagePickerController
在iPad2的全屏模式。 presentModalViewController:
似乎不適合我。 它顯示與捕獲按鈕框架,但不顯示正在捕獲什麼視頻預覽?在全屏顯示ipad2相機?
任何人有同樣的問題之前,現在如何解決?
感謝
我想表明UIImagePickerController
在iPad2的全屏模式。 presentModalViewController:
似乎不適合我。 它顯示與捕獲按鈕框架,但不顯示正在捕獲什麼視頻預覽?在全屏顯示ipad2相機?
任何人有同樣的問題之前,現在如何解決?
感謝
使用AVFoundation框架, 那麼AVCaptureVideoPreviewLayer可以設置爲全屏。
這個工作對我來說:
UIImagePickerController *controller = [[UIImagePickerController alloc] init];
controller.sourceType = UIImagePickerControllerSourceTypeCamera;
controller.allowsEditing = NO;
controller.delegate = self;
[self presentModalViewController:controller animated:YES];
注意自我是當前視圖控制器。
您的意思是,我會像平常一樣呈現我的UIImagePickerController,然後將'AVCaptureVideoPreviewLayer'添加爲imagePicker子圖層?你有什麼想法,爲什麼如果我在popOverView中顯示imagePicker,預覽圖層顯示,但不presentModal? – KONG 2011-03-28 14:31:37
都能跟得上:AVFoundation下,你不使用任何的UIImagePickerController多(有樣例代碼中,蘋果公司的)。對於目前的模式,我相信這是你初始化它的問題。 – nicc 2011-03-29 00:50:31