我有一个快速的问题。我正在使用以下代码在 iOS 4.x 设备上启动相机和录制视频,效果很好。我想在 iPad 2 设备上使用相同的代码,因为 iPad 2 具有视频录制功能。它会起作用吗?有人可以指导我吗?
if ([types containsObject:(id)kUTTypeMovie])
{
UIImagePickerController *pickerController = [[[UIImagePickerController alloc] init] autorelease];
pickerController.delegate = self;
pickerController.videoQuality = appDelegate.settingsCtrler.quality;
pickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
pickerController.showsCameraControls = YES;
pickerController.mediaTypes = [NSArray arrayWithObject:(id)kUTTypeMovie];
pickerController.videoMaximumDuration = maxDuration;
[appDelegate hideFloatingBar];
[self presentModalViewController:pickerController animated:YES];
}
先感谢您!