【发布时间】:2014-10-25 04:37:52
【问题描述】:
我有一个仅支持横向的 iPad 应用程序,但是当我尝试在 UIPopoverController 内显示 UIImagePickerController 时,它总是以纵向模式显示。即从 UI 的其余部分旋转 90 度。有谁知道我怎样才能让它显示在与我展示它的 ViewController 相同的方向上?
我正在像这样显示 imagePicker:
self.picker = [[FFSImagePicker alloc] init];
picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeImage];
picker.delegate = self;
picker.toolbarHidden = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.allowsEditing = NO;
picker.showsCameraControls = YES;
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:picker];
self.photoPickerPopover = popover;
[self.photoPickerPopover presentPopoverFromRect:photoButton.bounds inView:photoButton permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];
FFSImagePicker 只是 UIImagePickerController 的一个子类,我试图确保支持的方向只是横向,但这没有任何效果。
感谢您的帮助...
【问题讨论】:
-
试试这个:stackoverflow.com/questions/20468335/… 它确实帮助了我
-
谢谢,这确实为我指明了正确的方向,尽管它并没有解决问题。
标签: ios ipad uiimagepickercontroller uipopovercontroller