最近我开始收到针对UIAlertView的崩溃报告,仅来自使用iOS 8.3的用户。
Crashlytics报告:
Fatal Exception: UIApplicationInvalidInterfaceOrientation Supported orientations has no common orientation with the application, and [_UIAlertShimPresentingViewController shouldAutorotate] is returning YES
导致崩溃的代码行是[alertView show]:
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title
message:message
delegate:nil
cancelButtonTitle:cancelButtonTitle
otherButtonTitles:nil];
[alertView show];
这段代码在应用程序中已经存在很长时间,现在开始崩溃了。有人经历过类似的问题并解决了吗?
UIAlertView
或UIAlertController
。请参见下面的答案。 - stevekohls