'NSInternalInconsistencyException',原因:'自定义导航过渡 - 不同方向之间没有弹出!'

时间:2014-03-05 06:45:28

标签: ios objective-c uiviewcontroller containment

我通过MFSideMenu面临UIViewController遏制问题。

问题是,在支持方向的ViewControllers上,打开侧边菜单并选择不同的菜单选项(当设备处于横向模式时)会导致应用崩溃。这种行为在iOS 6中完美运行,但现在在iOS 7中失败了。

这是堆栈跟踪:

2014-03-05 14:40:00.335 MyApp[21890:70b]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'custom navigation transition - no popping between different orientations!'
*** First throw call stack:
(
    0   CoreFoundation                      0x024515e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x021098b6 objc_exception_throw + 44
    2   CoreFoundation                      0x024513bb +[NSException raise:format:] + 139
    3   UIKit                               0x009434b4 -[UINavigationController _startCustomTransition:] + 988
    4   UIKit                               0x009500c7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 688
    5   UIKit                               0x00950cb9 -[UINavigationController __viewWillLayoutSubviews] + 57
    6   UIKit                               0x00a8a181 -[UILayoutContainerView layoutSubviews] + 213
    7   UIKit                               0x00880267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
    8   libobjc.A.dylib                     0x0211b81f -[NSObject performSelector:withObject:] + 70
    9   QuartzCore                          0x01ecd2ea -[CALayer layoutSublayers] + 148
    10  QuartzCore                          0x01ec10d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    11  QuartzCore                          0x01ec0f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
    12  QuartzCore                          0x01e28ae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
    13  QuartzCore                          0x01e29e71 _ZN2CA11Transaction6commitEv + 393
    14  QuartzCore                          0x01e2a544 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
    15  CoreFoundation                      0x024194ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
    16  CoreFoundation                      0x0241941f __CFRunLoopDoObservers + 399
    17  CoreFoundation                      0x023f7344 __CFRunLoopRun + 1076
    18  CoreFoundation                      0x023f6ac3 CFRunLoopRunSpecific + 467
    19  CoreFoundation                      0x023f68db CFRunLoopRunInMode + 123
    20  GraphicsServices                    0x036979e2 GSEventRunModal + 192
    21  GraphicsServices                    0x03697809 GSEventRun + 104
    22  UIKit                               0x00815d3b UIApplicationMain + 1225
    23  MyApp                               0x000022aa main + 138
    24  libdyld.dylib                       0x02e9f701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

任何有关调试此操作的帮助表示赞赏。

P / S:注意控制台日志中“orientation”的拼写错误。如果其他人偶然发现这个问题,我会把它拼错。

1 个答案:

答案 0 :(得分:0)

请检查您是否具有以下功能。如果是,请禁用它们并尝试

  • (BOOL)shouldAutoRotate;
  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation;

删除所有与方向相关的方法。

谢谢, ithay。