UINavigationController shouldAutorotate返回YES

时间:2015-10-11 08:35:03

标签: ios

  

*由于未捕获的异常'UIApplicationInvalidInterfaceOrientation'而终止应用,原因:'支持   方向与应用程序没有共同的方向,并且   [UINavigationController shouldAutorotate]返回YES'   * 第一次抛出调用堆栈:(0 CoreFoundation 0x000000011253ec65 exceptionPreprocess + 165 1 libobjc.A.dylib
  0x00000001121d7bb7 objc_exception_throw + 45 2 CoreFoundation
  0x000000011253eb9d + [NSException raise:format:] + 205 3 UIKit
  0x000000010e3843d8 - [UIViewController   __supportedInterfaceOrientations] + 644 4 UIKit 0x000000010e379673 - [UIViewController   _preferredInterfaceOrientationGivenStatusBarAndDeviceAndOrientation:] + 64 5 UIKit 0x000000010e28b930 - [UIWindow setRootViewController:] + 103 6 Masafi_Universal 0x000000010cda01a2 - [MasafiAppDelegate   application:didFinishLaunchingWithOptions:] + 8674 7 UIKit
  0x000000010e23a748 - [UIApplication   _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 240 8 UIKit 0x000000010e23b357    - [UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2540 9 UIKit 0x000000010e23e19e - [UIApplication   _runWithMainScene:transitionContext:completion:] + 1349 10 UIKit 0x000000010e23d095 - [UIApplication workspaceDidEndTransaction:] + 179     11 FrontBoardServices 0x00000001136a95e5   __31- [FBSSerialQueue performAsync:] _ block_invoke_2 + 21 12 CoreFoundation 0x000000011247241c   __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK
+ 12 13 CoreFoundation 0x0000000112468165 __CFRunLoopDoBlocks + 341 14 CoreFoundation
  0x0000000112467947 __CFRunLoopRun + 887 15 CoreFoundation
  0x0000000112467366 CFRunLoopRunSpecific + 470 16 UIKit
  0x000000010e23cb02 - [UIApplication _run] + 413 17 UIKit
  0x000000010e23f8c0 UIApplicationMain + 1282 18 Masafi_Universal
  0x000000010ccc8a9f main + 111 19 libdyld.dylib
  0x0000000112a4e145 start + 1)libc ++ abi.dylib:终止于   NSException类型的未捕获异常

在为窗口设置RootViewController时发生此异常。

[self.window setRootViewController:dummyNavController];

0 个答案:

没有答案