即将溢出幻灯片转换计数?

时间:2012-07-25 07:04:40

标签: xcode4.3 uipopovercontroller ios5.1

我已更新到iOS 5.1并遇到此问题。我有一个Master和Detail viewcontrollers。我也在使用splitViewController。

问题是当我以横向模式启动应用程序时,它会显示此错误

*** Assertion failure in -[UIPopoverController _incrementSlideTransitionCount:]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'About to overflow slide transition count'

我正在使用ARC,如果在纵向模式下启动,程序运行得非常好。请提供我的建议。

1 个答案:

答案 0 :(得分:1)

这可能是因为代码中的某个地方正在尝试显示Master ViewController。虽然这在纵向启动时完全没问题(因为最初没有显示主视图控制器),但是会因为显示主视图控制器而导致横向问题,因此“滑动过渡计数”。

如果没有看到您的代码,我无法准确地告诉您代码的哪一部分导致此问题,但您可能希望通过执行类似

的操作来传递此错误
 if(UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
    [run the code that is crashing your app]
}

这样您的代码只会在您需要时调用(纵向)。