IOS拍照控件同时显示拍照与录像

- (void) recordVideo: (id) sender

{

UIImagePickerController *ipc = [[UIImagePickerController alloc] init];

ipc.sourceTypeUIImagePickerControllerSourceTypeCamera;

ipc.delegate = self;

ipc.allowsEditing = YES;

ipc.videoQuality = UIImagePickerControllerQualityTypeMedium;

ipc.videoMaximumDuration = 30.0f; // 30 seconds

///ipc.mediaTypes = [NSArray arrayWithObject:@"public.movie"];

//主要是下边的两能数,@"public.movie"@"public.image"  一个是录像,一个是拍照

ipc.mediaTypes = [NSArray arrayWithObjects:@"public.movie", @"public.image", nil];

[self presentModalViewController:ipc animated:YES];

}

你可能感兴趣的:(IOS拍照控件同时显示拍照与录像)