在我的日志记录服务中遇到了很多这样的崩溃。有什么提示吗?我的应用仅支持纵向模式。
线程:崩溃:com.apple.main-thread
0 libobjc.A.dylib 0x32bfbf46 objc_msgSend + 5
1 UIKit 0x289ba531 -[UIWindow _updateInterfaceOrientationFromDeviceOrientation:] + 152
2 CoreFoundation 0x254d44a1 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
3 CoreFoundation 0x2543093d _CFXNotificationPost + 1784
4 Foundation 0x261609b9 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
5 UIKit 0x289ba2f3 -[UIDevice setOrientation:animated:] + 318
6 UIKit 0x289ba0a3 -[UIApplication handleEvent:withNewEvent:] + 1566
7 UIKit 0x289b99c1 -[UIApplication sendEvent:] + 72
8 UIKit 0x28a1e801 _UIApplicationHandleEvent + 632
9 GraphicsServices 0x2c79d679 _PurpleEventCallback + 528
10 GraphicsServices 0x2c79d2c3 PurpleEventCallback + 34
11 CoreFoundation 0x254e1dab __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
12 CoreFoundation 0x254e1d47 __CFRunLoopDoSource1 + 346
13 CoreFoundation 0x254e0349 __CFRunLoopRun + 1608
14 CoreFoundation 0x2542e621 CFRunLoopRunSpecific + 476
15 CoreFoundation 0x2542e433 CFRunLoopRunInMode + 106
16 GraphicsServices 0x2c79c0a9 GSEventRunModal + 136
17 UIKit 0x28a18809 UIApplicationMain + 1440
18 simplyUs 0x00052013 main (main.m:14)
最佳答案
我遇到了同样的问题。
我的情况可能与您相似。一些解除分配的 Controller 仍然收到方向通知。当我在操作表委托(delegate)方法中呈现 Controller 时,我崩溃了:
actionSheet:clickedButtonAtIndex:
但是当controller出现在里面
actionSheet:didDismissWithButtonIndex:
现在一切正常。我认为当此窗口位于顶部时,我们应该在窗口中显示 Controller 。因此,在 iOS8 中呈现 Controller 之前,应关闭所有警报 View /操作表窗口。否则它仍会收到方向通知。
关于_updateInterfaceOrientationFromDeviceOrientation 上的 ios8 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26001873/