Supported orientations has no common orientation with the application crash bug on iPad

来源:互联网 发布:淘宝卖家回复语大全 编辑:程序博客网 时间:2024/05/22 23:41

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

原创粉丝点击