1、reason: 'UIAlertController:supportedInterfaceOrientations was invoked recursively!'
遞歸錯誤,在網(wǎng)上找到了解決方法,但是不知道為什么。
解決方法:
建一個UIAlertController的分類:supportedInterfaceOrientations
// 避免alert遞歸調用
// bug: reason: 'UIAlertController:supportedInterfaceOrientations was invoked recursively!'
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait;
}
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
#endif
參考文章:
http://blog.csdn.net/jiang314/article/details/52402961