gpt4 book ai didi

ios - 由于名称为 'NSInternalInconsistencyException' 的未捕获异常 'OverlayView' 而终止应用程序

转载 作者:行者123 更新时间:2023-11-28 08:29:54 29 4
gpt4 key购买 nike

我打算使用自定义 View Koloda在我通过 Podfile 新创建的 swift xcode 项目中。 pod install后,在Main.storyboard中创建KolodaView并构建成功,运行时报错如下:

2016-08-20 09:44:38.918 MsgNotFree[25760:2220650] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/jasonzhu/Library/Developer/CoreSimulator/Devices/DDE42B9D-6304-4552-AD30-A1BFA3A7B3E0/data/Containers/Bundle/Application/D1282CEB-9914-4C37-BCD2-DC05675C9FD1/MsgNotFree.app> (loaded)' with name 'OverlayView''
*** First throw call stack:
(
0 CoreFoundation 0x000000010a227d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c8d4deb objc_exception_throw + 48
2 CoreFoundation 0x000000010a227cbd +[NSException raise:format:] + 205
3 UIKit 0x000000010b720c89 -[UINib instantiateWithOwner:options:] + 499
4 UIKit 0x000000010b723415 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 223
5 MsgNotFree 0x0000000109eedd90 _TFC10MsgNotFree19FirstViewController6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 368
6 MsgNotFree 0x0000000109eedf92 _TToFC10MsgNotFree19FirstViewController6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 66
7 MsgNotFree 0x0000000109eee918 _TTDFC10MsgNotFree19FirstViewController6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 56
8 MsgNotFree 0x0000000109eee085 _TTWC10MsgNotFree19FirstViewControllerS_20KolodaViewDataSourceS_FS1_6kolodafTCS_10KolodaView25viewForCardOverlayAtIndexSu_GSqCS_11OverlayView_ + 53
9 Koloda 0x0000000109ff14f5 _TFC6Koloda10KolodaView13configureCardfTCS_17DraggableCardView7atIndexSu_T_ + 501
10 Koloda 0x0000000109ff15b2 _TToFC6Koloda10KolodaView13configureCardfTCS_17DraggableCardView7atIndexSu_T_ + 66
11 Koloda 0x0000000109ff1183 _TFC6Koloda10KolodaView17createCardAtIndexfTSu5frameGSqVSC6CGRect__CS_17DraggableCardView + 611
12 Koloda 0x0000000109ff292b _TFC6Koloda10KolodaViewP33_DFF55D12D516409CF60937DD60F8B8969setupDeckfT_T_ + 955
13 Koloda 0x0000000109ff1e60 _TFC6Koloda10KolodaViewW10dataSourceXwGSqPS_20KolodaViewDataSource__ + 32
14 Koloda 0x0000000109ff1f60 _TFC6Koloda10KolodaViews10dataSourceXwGSqPS_20KolodaViewDataSource__ + 160
15 MsgNotFree 0x0000000109eec73e _TFC10MsgNotFree19FirstViewController11viewDidLoadfT_T_ + 398
16 MsgNotFree 0x0000000109eec802 _TToFC10MsgNotFree19FirstViewController11viewDidLoadfT_T_ + 34
17 UIKit 0x000000010b4f3984 -[UIViewController loadViewIfRequired] + 1198
18 UIKit 0x000000010b4f3cd3 -[UIViewController view] + 27
19 UIKit 0x000000010b5571bc -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 502
20 UIKit 0x000000010b556130 -[UITabBarController transitionFromViewController:toViewController:] + 59
21 UIKit 0x000000010b551f41 -[UITabBarController _setSelectedViewController:] + 377
22 UIKit 0x000000010b551db7 -[UITabBarController setSelectedViewController:] + 234
23 UIKit 0x000000010b408680 +[UIView(Animation) performWithoutAnimation:] + 65
24 UIKit 0x000000010b54bddc -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] + 344
25 UIKit 0x000000010b54d5df -[UITabBarController viewWillAppear:] + 193
26 UIKit 0x000000010b4f92bd -[UIViewController _setViewAppearState:isAnimating:] + 710
27 UIKit 0x000000010b4f9958 -[UIViewController __viewWillAppear:] + 149
28 UIKit 0x000000010b401255 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 633
29 UIKit 0x000000010b40fc9e -[UIView(Internal) _addSubview:positioned:relativeTo:] + 481
30 UIKit 0x000000010b3ca29a -[UIWindow addRootViewControllerViewIfPossible] + 803
31 UIKit 0x000000010b3ca69d -[UIWindow _setHidden:forced:] + 282
32 UIKit 0x000000010b3dc180 -[UIWindow makeKeyAndVisible] + 42
33 UIKit 0x000000010b350ed9 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
34 UIKit 0x000000010b357568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
35 UIKit 0x000000010b354714 -[UIApplication workspaceDidEndTransaction:] + 188
36 FrontBoardServices 0x000000010d40f8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
37 FrontBoardServices 0x000000010d40f741 -[FBSSerialQueue _performNext] + 178
38 FrontBoardServices 0x000000010d40faca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
39 CoreFoundation 0x000000010a14d301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
40 CoreFoundation 0x000000010a14322c __CFRunLoopDoSources0 + 556
41 CoreFoundation 0x000000010a1426e3 __CFRunLoopRun + 867
42 CoreFoundation 0x000000010a1420f8 CFRunLoopRunSpecific + 488
43 UIKit 0x000000010b353f21 -[UIApplication _run] + 402
44 UIKit 0x000000010b358f09 UIApplicationMain + 171
45 MsgNotFree 0x0000000109eec272 main + 114
46 libdyld.dylib 0x00000001112d892d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

其中,OverlayView类可以在ViewController中被引用,这意味着第三方类在项目级别被正确引用。

演示项目是here

谁能给我一些提示,问题可能出在哪里?非常感谢!

最佳答案

此错误是由于您的包中没有名为 .xib 的 overlayView 文件,创建一个新文件 -> UserInterface -> View -> (将其重命名为 OverlayView)现在得到 OverlayView 并选择 View ,将其类更改为 OverlayView。

关于ios - 由于名称为 'NSInternalInconsistencyException' 的未捕获异常 'OverlayView' 而终止应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39052501/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com