Iphone 如何强制UIImagePickerController以横向模式录制视频
我的应用程序正在运行potrate模式,但我想在横向模式下录制视频Iphone 如何强制UIImagePickerController以横向模式录制视频,iphone,objective-c,uiimagepickercontroller,video-capture,Iphone,Objective C,Uiimagepickercontroller,Video Capture,我的应用程序正在运行potrate模式,但我想在横向模式下录制视频 self.imgPicker = [[UIImagePickerController alloc] init]; self.imgPicker.editing=FALSE; //self.imgPicker.allowsImageEditing = YES; self.imgPicker.delegate = (id)self; [self.imgPick
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
请指导我如何操作。正如Apple doc所述,UIImagePickerController从现在起将被称为UIIPC,仅在纵向模式下工作。您的应用程序将被重新发布。无论如何,你可以尝试这个在横向模式下打开
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];