Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
在iOS 6中,iPad landscape模式下,popoverController的contentViewController设置为UIImagePickerController, popover弹出时会遇到上述crash问题。
一个可行的解决方法是:
添加如下Category:
@interface UIImagePickerController(Nonrotating)
- (BOOL)shouldAutorotate;
@end
@implementation UIImagePickerController(Nonrotating)
- (BOOL)shouldAutorotate {
return NO;
}
参考:http://stackoverflow.com/questions/12540597/supported-orientations-has-no-common-orientation-with-the-application-and-shoul?lq=1
本文详细介绍了在iOS6环境下,当使用popoverController展示UIImagePickerController时,在iPad landscape模式下出现崩溃的问题,并提供了一个有效的解决方法。通过添加自定义Category,将UIImagePickerController的shouldAutorotate属性设置为NO,可以避免此问题发生。
6931

被折叠的 条评论
为什么被折叠?



