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
。
請指導我如何做到這一點。
你確定嗎? –