【发布时间】:2012-10-03 07:24:24
【问题描述】:
当我在模拟器或设备中测试 4.x 下的单视图应用程序时,在启动时,主 UIViewController 的 shouldAutorotateToInterfaceOrientation: 方法被精确调用 3046 次(在设备上)或 23777 次(在模拟器上),然后崩溃。 ...更新...
更新:在我拥有的方法中
UIInterfaceOrientation currentOrientation = self.interfaceOrientation;
这似乎是罪魁祸首,它导致 shouldAutorotateToInterfaceOrientation: 再次被调用,因此将其置于无限循环直到崩溃。有谁知道为什么?它在 iOS 5+ 中不这样做
【问题讨论】:
标签: iphone ios uiviewcontroller ios4 autorotate