我的应用程序正在运行 potrate 模式,但我想以横向模式录制视频。
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
默认以横向模式加载。
请指导我如何做同样的事情。