Closed itdongbaojun closed 4 years ago
如题:最新的几个版本调用presentViewController会导致crash 调用代码如下:
(void)testBtnClick{ UIViewController vc = [self createDemoViewController]; HBDNavigationController nav = [[HBDNavigationController alloc] initWithRootViewController:vc]; [self presentViewController:nav animated:YES completion:^{
}]; }
crash 信息如下: Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation 'unknown' must match a supported interface orientation: 'portrait'!' First throw call stack: (0x1e31f298c 0x1e23cb9f8 0x1e30fcbc0 0x20f6f5e40 0x20f61106c 0x20f607708 0x20f6ea234 0x20f6ebccc 0x20f6ee3a8 0x20f6ee8a4 0x20f6ee300 0x20f6ee560 0x102fb5c00 0x20fc85300 0x20f47dcec 0x20f47dc1c 0x20fc85300 0x20f72e424 0x20f72e744 0x20f72d7b0 0x20fcbc5c4 0x20fcbd7ec 0x20fc9d85c 0x20fd639d4 0x20fd66100 0x20fd5f330 0x1e3184728 0x1e31846a8 0x1e3183f90 0x1e317eecc 0x1e317e7c0 0x1e537f79c 0x20fc83c38 0x102fb5430 0x1e2c428e0) libc++abi.dylib: terminating with uncaught exception of type NSException
试下 1.6.4
@listenzz 还是不行,依然crash,我先研究下具体是啥问题吧
有结果没
最近在忙公司的项目,看来问题是解决了哈。
如题:最新的几个版本调用presentViewController会导致crash 调用代码如下:
(void)testBtnClick{ UIViewController vc = [self createDemoViewController]; HBDNavigationController nav = [[HBDNavigationController alloc] initWithRootViewController:vc]; [self presentViewController:nav animated:YES completion:^{
}]; }
crash 信息如下: Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation 'unknown' must match a supported interface orientation: 'portrait'!' First throw call stack: (0x1e31f298c 0x1e23cb9f8 0x1e30fcbc0 0x20f6f5e40 0x20f61106c 0x20f607708 0x20f6ea234 0x20f6ebccc 0x20f6ee3a8 0x20f6ee8a4 0x20f6ee300 0x20f6ee560 0x102fb5c00 0x20fc85300 0x20f47dcec 0x20f47dc1c 0x20fc85300 0x20f72e424 0x20f72e744 0x20f72d7b0 0x20fcbc5c4 0x20fcbd7ec 0x20fc9d85c 0x20fd639d4 0x20fd66100 0x20fd5f330 0x1e3184728 0x1e31846a8 0x1e3183f90 0x1e317eecc 0x1e317e7c0 0x1e537f79c 0x20fc83c38 0x102fb5430 0x1e2c428e0) libc++abi.dylib: terminating with uncaught exception of type NSException