我正在使用UIAlertView
但是在IOS 8.3中我改为UIAlertViewController
因为UIAlertview
无效但UIAlertViewController
因错误而崩溃
'UIApplicationInvalidInterfaceOrientation',
reason: 'Supported orientations has no common orientation with
the application, and
[ChartsTableViewController2_iPhone shouldAutorotate] is returning YES'
不知道该怎么做请帮助我。
答案 0 :(得分:3)
尝试继承UIAlertController并添加此代码。希望它有所帮助。
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
- (BOOL) shouldAutorotate {
return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationPortrait;
}