我使用UiImagePickerController在iPhone 3GS中捕获了视频,但同样的应用程序没有使用iPhone 4上的摄像头,它在iPhone 3GS(OS 4)上运行良好。
以下是我用来使用摄像机的代码。
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
答案 0 :(得分:0)
你需要指定你的
UIImagePickerControllerCameraDevice
要么
UIImagePickerControllerCameraDeviceRear
或UIImagePickerControllerCameraDeviceFront
在iPhone 4上
另外,设置
UIImagePickerControllerCameraCaptureMode
至
UIImagePickerControllerCameraCaptureModeVideo