问题描述:
Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [UIAlertController shouldAutorotate] is returning YES'
解决办法:
添加类别重写shouldAutorotate方法;
#import <UIKit/UIKit.h>
@interface UIAlertView (RotationControl)
- (BOOL)shouldAutorotate;
@end
#import "UIAlertView+RotationControl.h"
@implementation UIAlertView (RotationControl)
- (BOOL)shouldAutorotate
{
return NO;
}
@end
解决问题!