ios - [JWNavigationController topViewController]:无法识别的选择器发送到实例 0x7faf61425ef0'
问题描述
在我的旧项目中,我已将 JWNavigationController 用于滑块菜单。在 iPHONE6、iPHONE7 设备中工作正常,但是当我在 iphonex、Xr、Xs Max 中运行应用程序时,应用程序崩溃了。我设置了异常断点但找不到崩溃行请帮忙我。
这是我的崩溃日志
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[JWNavigationController topViewController]: unrecognized selector sent to instance 0x7faf61425ef0'
*** First throw call stack:
(
0 CoreFoundation 0x0000000112fa66fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000011254aac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000112fc4ab4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 UIKitCore 0x00000001205fdc3d -[UIResponder doesNotRecognizeSelector:] + 287
4 CoreFoundation 0x0000000112fab443 ___forwarding___ + 1443
5 CoreFoundation 0x0000000112fad238 _CF_forwarding_prep_0 + 120
6 UIKitCore 0x0000000120a741a1 -[UIView _setSafeAreaInsets:updateSubviewsDuringNextLayoutPass:] + 261
7 UIKitCore 0x0000000120a742d9 -[UIView setSafeAreaInsets:] + 75
8 UIKitCore 0x000000011ffc3592 -[UIViewController _updateViewSafeAreaInsetsAndEagerlyUpdateContentScrollView:] + 124
9 UIKitCore 0x000000011ffc3df2 -[UIViewController _setContentOverlayInsets:andLeftMargin:rightMargin:] + 940
10 UIKitCore 0x000000011ffc5f64 __121-[UIViewController __updateContentOverlayInsetsWithOurRect:inBoundsOfAncestorViewController:viaImmediateChildOfAncestor:]_block_invoke + 497
11 UIKitCore 0x000000011ffc5d2d -[UIViewController __updateContentOverlayInsetsWithOurRect:inBoundsOfAncestorViewController:viaImmediateChildOfAncestor:] + 3915
12 UIKitCore 0x000000011ffc4a35 -[UIViewController _updateContentOverlayInsetsFromParentIfNecessary] + 587
13 UIKitCore 0x000000011ffc4229 -[UIViewController _updateContentOverlayInsetsForSelfAndChildren] + 229
14 UIKitCore 0x000000011ffd1dc9 -[UIViewController _updateLayoutForStatusBarAndInterfaceOrientation] + 954
15 UIKitCore 0x000000011ffd2081 -[UIViewController _updateLayoutForStatusBarAndInterfaceOrientation] + 1650
16 UIKitCore 0x000000011ffd7a8d -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 1184
17 UIKitCore 0x0000000120a96962 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1414
18 UIKitCore 0x0000000120a894ee __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 151
19 UIKitCore 0x0000000120a893cd -[UIView(Hierarchy) _postMovedFromSuperview:] + 795
20 UIKitCore 0x0000000120a9963d -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1948
21 UIKitCore 0x0000000120a5c749 -[UITransitionView transition:fromView:toView:removeFromView:] + 1540
22 UIKitCore 0x000000011fff83f2 -[UIViewControllerBuiltinTransitionViewAnimator animateTransition:] + 2080
23 UIKitCore 0x000000011feef985 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 3088
24 UIKitCore 0x00000001205dccc9 _runAfterCACommitDeferredBlocks + 318
25 UIKitCore 0x00000001205cc199 _cleanUpAfterCAFlushAndRunDeferredBlocks + 358
26 UIKitCore 0x00000001205f932b _afterCACommitHandler + 124
27 CoreFoundation 0x0000000112f0d0f7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
28 CoreFoundation 0x0000000112f075be __CFRunLoopDoObservers + 430
29 CoreFoundation 0x0000000112f07c31 __CFRunLoopRun + 1505
30 CoreFoundation 0x0000000112f07302 CFRunLoopRunSpecific + 626
31 GraphicsServices 0x0000000116fbb2fe GSEventRunModal + 65
32 UIKitCore 0x00000001205d1ba2 UIApplicationMain + 140
33 Audi 0x000000010f8c9b40 main + 112
34 libdyld.dylib 0x00000001148d4541 start + 1
35 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
解决方案
推荐阅读
- php - php jquery中Active和Deactive更改颜色的问题
- c# - C# Moq 如何设置 EF DbContext 扩展方法 ToList() 以返回 mock.Object.Tolist()
- python - 检查并将值从 bash 数组复制到 json 数组
- php - 使用 cURL Multi,但仍然不是异步的
- sql-server - Visual Studio中的sql错误
- php - php邮件通知运行没有错误但无法运行
- scala - 文本数据源只支持单列,你有 8 列
- javascript - 使用打字稿将状态传递给react-redux中的子组件
- c++ - 在 Cmake 中构建 Assimp 时出错
- powershell - 使用 Get-AzureRmAutomationModule cmdlet 检索模块时全局模块的模块版本不一致