我正在使用 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'
不知道该怎么办,请帮帮我。
最佳答案
尝试继承 UIAlertController 并添加此代码。希望对您有所帮助。
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAll;
}
- (BOOL) shouldAutorotate {
return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
return UIInterfaceOrientationPortrait;
}
关于ios - UIAlertviewController 在 IOS8.3 中崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29716011/