-[UIViewController _loadViewFromNibNamed:bundle:] 无法加载笔尖
我已经购买了 Apple IOS 证书,现在我正在真实设备上构建我的第一个应用程序。但我有一个问题。我的观点之一是一个没有 nib 文件并且在模拟器中运行完美的画廊。当我在设备上“构建并运行”并转到图库视图时,我在控制台中收到此错误,并且应用程序崩溃了,
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "iCarouselExampleViewController"'
*** Call stack at first throw:
(
0 CoreFoundation 0x35f08c7b __exceptionPreprocess + 114
1 libobjc.A.dylib 0x30186ee8 objc_exception_throw + 40
2 CoreFoundation 0x35f08ac3 +[NSException raise:format:arguments:] + 70
3 CoreFoundation 0x35f08af7 +[NSException raise:format:] + 30
4 UIKit 0x339c64a0 -[UIViewController _loadViewFromNibNamed:bundle:] + 300
5 UIKit 0x339c5280 -[UIViewController loadView] + 128
6 UIKit 0x3386edf4 -[UIViewController view] + 52
7 UIKit 0x3387ff34 -[UIViewController contentScrollView] + 32
8 UIKit 0x3387fd54 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 44
9 UIKit 0x3387fc00 -[UINavigationController _layoutViewController:] + 36
10 UIKit 0x3387f52c -[UINavigationController _startTransition:fromViewController:toViewController:] + 520
11 UIKit 0x3387f290 -[UINavigationController _startDeferredTransitionIfNeeded] + 264
12 UIKit 0x3386ec4c -[UINavigationController pushViewController:transition:forceImmediate:] + 912
13 UIKit 0x3386e8b0 -[UINavigationController pushViewController:animated:] + 44
14 BlazingStump 0x00002663 -[RootViewController galleryView] + 94
15 CoreFoundation 0x35eada43 -[NSObject(NSObject) performSelector:withObject:withObject:] + 26
16 UIKit 0x3384af20 -[UIApplication sendAction:to:from:forEvent:] + 136
17 UIKit 0x3384ae88 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 40
18 UIKit 0x3384ae50 -[UIControl sendAction:to:forEvent:] + 52
19 UIKit 0x3384aaa0 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 536
20 UIKit 0x3384b5cc -[UIControl touchesEnded:withEvent:] + 460
21 UIKit 0x3383ceb0 -[UIWindow _sendTouchesForEvent:] + 588
22 UIKit 0x3383c4e4 -[UIWindow sendEvent:] + 396
23 UIKit 0x3381fc9c -[UIApplication sendEvent:] + 452
24 UIKit 0x3381f3b4 _UIApplicationHandleEvent + 6824
25 GraphicsServices 0x35262c88 PurpleEventCallback + 1048
26 CoreFoundation 0x35e9a5cb __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 28
27 CoreFoundation 0x35e9a589 __CFRunLoopDoSource1 + 164
28 CoreFoundation 0x35e8c835 __CFRunLoopRun + 580
29 CoreFoundation 0x35e8c50b CFRunLoopRunSpecific + 226
30 CoreFoundation 0x35e8c419 CFRunLoopRunInMode + 60
31 GraphicsServices 0x35261d24 GSEventRunModal + 196
32 UIKit 0x3386557c -[UIApplication _run] + 588
33 UIKit 0x33862558 UIApplicationMain + 972
34 BlazingStump 0x000023dd main + 48
35 BlazingStump 0x000023a8 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
(gdb)
这是否与导航控制器有关?因为我的应用程序是基于导航的应用程序
I have purchased an Apple IOS certificate and now i'm building my first app onto a real device. But i got a problem. One of my views is a gallery that has no nib file and in simulator is working perfectly. When i "build and go" on a device and go to the gallery view i get this error into the console and the app crashes
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "iCarouselExampleViewController"'
*** Call stack at first throw:
(
0 CoreFoundation 0x35f08c7b __exceptionPreprocess + 114
1 libobjc.A.dylib 0x30186ee8 objc_exception_throw + 40
2 CoreFoundation 0x35f08ac3 +[NSException raise:format:arguments:] + 70
3 CoreFoundation 0x35f08af7 +[NSException raise:format:] + 30
4 UIKit 0x339c64a0 -[UIViewController _loadViewFromNibNamed:bundle:] + 300
5 UIKit 0x339c5280 -[UIViewController loadView] + 128
6 UIKit 0x3386edf4 -[UIViewController view] + 52
7 UIKit 0x3387ff34 -[UIViewController contentScrollView] + 32
8 UIKit 0x3387fd54 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 44
9 UIKit 0x3387fc00 -[UINavigationController _layoutViewController:] + 36
10 UIKit 0x3387f52c -[UINavigationController _startTransition:fromViewController:toViewController:] + 520
11 UIKit 0x3387f290 -[UINavigationController _startDeferredTransitionIfNeeded] + 264
12 UIKit 0x3386ec4c -[UINavigationController pushViewController:transition:forceImmediate:] + 912
13 UIKit 0x3386e8b0 -[UINavigationController pushViewController:animated:] + 44
14 BlazingStump 0x00002663 -[RootViewController galleryView] + 94
15 CoreFoundation 0x35eada43 -[NSObject(NSObject) performSelector:withObject:withObject:] + 26
16 UIKit 0x3384af20 -[UIApplication sendAction:to:from:forEvent:] + 136
17 UIKit 0x3384ae88 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 40
18 UIKit 0x3384ae50 -[UIControl sendAction:to:forEvent:] + 52
19 UIKit 0x3384aaa0 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 536
20 UIKit 0x3384b5cc -[UIControl touchesEnded:withEvent:] + 460
21 UIKit 0x3383ceb0 -[UIWindow _sendTouchesForEvent:] + 588
22 UIKit 0x3383c4e4 -[UIWindow sendEvent:] + 396
23 UIKit 0x3381fc9c -[UIApplication sendEvent:] + 452
24 UIKit 0x3381f3b4 _UIApplicationHandleEvent + 6824
25 GraphicsServices 0x35262c88 PurpleEventCallback + 1048
26 CoreFoundation 0x35e9a5cb __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 28
27 CoreFoundation 0x35e9a589 __CFRunLoopDoSource1 + 164
28 CoreFoundation 0x35e8c835 __CFRunLoopRun + 580
29 CoreFoundation 0x35e8c50b CFRunLoopRunSpecific + 226
30 CoreFoundation 0x35e8c419 CFRunLoopRunInMode + 60
31 GraphicsServices 0x35261d24 GSEventRunModal + 196
32 UIKit 0x3386557c -[UIApplication _run] + 588
33 UIKit 0x33862558 UIApplicationMain + 972
34 BlazingStump 0x000023dd main + 48
35 BlazingStump 0x000023a8 start + 40
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
(gdb)
is it something with teh navigation controller? because my app is navigation based application
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不要调用 initWithNibName 并且不给它一个笔尖。你直接调用init就可以了。那应该会给你你想要的。
Don't call initWithNibName and not give it a nib. You can just call init. That should give you what you want.
它不是导航控制器,它显然正在寻找一个名为 iCarouselExampleViewController 的笔尖。
It's not the navigation controller its clearly looking for a nib called iCarouselExampleViewController.
iCarouselExampleViewController 是 wat 代码正在寻找裂纹_琼斯是正确的
iCarouselExampleViewController is wat code is looking for crackity_jones is right