1

我正面临通过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”的拼写错误。我把它拼错了,以防其他人也偶然发现这个问题。

4

1 回答 1

0

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

  • (BOOL) 应该自动旋转;
  • (BOOL) 应该自动旋转到接口方向:(UIInterfaceOrientation) 到接口方向;

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

谢谢,伊泰。

于 2014-04-16T12:38:44.567 回答