1
我的应用程序正在运行potrate模式,但我想以横向模式录制视频。如何强制UIImagePickerController以横向模式录制视频
self.imgPicker = [[UIImagePickerController alloc] init];
self.imgPicker.editing=FALSE;
//self.imgPicker.allowsImageEditing = YES;
self.imgPicker.delegate = (id)self;
[self.imgPicker shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationLandscapeRight];
//self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
#if !(TARGET_IPHONE_SIMULATOR)
self.imgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
#endif
imgPicker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
NSArray *mediaTypesAllowed = [NSArray arrayWithObject:@"public.movie"];
[imgPicker setMediaTypes:mediaTypesAllowed];
[self.imgPicker shouldAutorotateToInterfaceOrientation: UIInterfaceOrientationLandscapeRight];
[self presentModalViewController:imgPicker animated:YES];
我想用默认值在横向模式下加载UIImagePickerController
。
请指导我如何做到这一点。
你确定吗? –