1
我有問題。我使用以下代碼在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];
}
先謝謝您了!
太棒了!謝謝。所以,正如你所說,我只需要與iOS 4.3 SDK與相同的代碼應該正常工作? – Getsy 2011-03-16 18:40:25