【发布时间】:2013-08-15 20:26:59
【问题描述】:
我的应用正在执行计算并在图表中显示结果。当设备旋转时,会生成一个新的UIViewController,以横向视图显示图形。因此必要的参数被传递给新的 ViewController 来创建图形。
当计算仍在运行时,当设备转为横向时,应用程序会崩溃。
有没有合适的方法暂时禁用使用过的DeviceOrientationNotification?
-(void)calculate
{
disable DeviceOrientationNotification
...calculation code here
enable DeviceOrientationNotification again
}
谢谢 (不要再打我了,即使这个问题看起来很愚蠢)
【问题讨论】:
标签: ios uiviewcontroller device-orientation