gpt4 book ai didi

iphone - 修改 XIB 文件后应用程序崩溃

转载 作者:行者123 更新时间:2023-12-03 16:35:27 25 4
gpt4 key购买 nike

在 RootViewController.xib 上添加新的搜索栏,并与 FileOwner 连接后,App 将崩溃。它在崩溃时报告堆栈:

2011-07-17 17:12:43.756 TableView[1397:207] *** Terminating app due to uncaught 
exception 'NSInternalInconsistencyException', reason: '-[UIViewController
_loadViewFromNibNamed:bundle:] loaded the "RootViewController" nib but the view outlet
was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc85a9 __exceptionPreprocess + 185

1 libobjc.A.dylib 0x00f1c313 objc_exception_throw + 44

2 CoreFoundation 0x00d80ef8 +[NSException raise:format:arguments:] + 136

3 CoreFoundation 0x00d80e6a +[NSException raise:format:] + 58

4 UIKit 0x0036a709 -[UIViewController _loadViewFromNibNamed:bundle:] + 295

5 UIKit 0x00368134 -[UIViewController loadView] + 120

6 UIKit 0x004c1dd8 -[UITableViewController loadView] + 80

7 UIKit 0x0036800e -[UIViewController view] + 56

8 UIKit 0x003667f5 -[UIViewController nextResponder] + 34

9 UIKit 0x003874a6 -[UIResponder _containsResponder:] + 41

10 UIKit 0x00371c4e -[UINavigationController defaultFirstResponder] + 80

11 UIKit 0x00386647 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 42

12 UIKit 0x00386663 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 70

13 UIKit 0x00386406 -[UIResponder(Internal) _promoteDeepestDefaultFirstResponder] + 42

14 TableView 0x00002a0a -[TableViewAppDelegate application:didFinishLaunchingWithOptions:] + 135

15 UIKit 0x002b8c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163

16 UIKit 0x002bad88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439

17 UIKit 0x002c5617 -[UIApplication handleEvent:withNewEvent:] + 1533

18 UIKit 0x002bdabf -[UIApplication sendEvent:] + 71

19 UIKit 0x002c2f2e _UIApplicationHandleEvent + 7576

20 GraphicsServices 0x01720992 PurpleEventCallback + 1550

21 CoreFoundation 0x00da9944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52

22 CoreFoundation 0x00d09cf7 __CFRunLoopDoSource1 + 215

23 CoreFoundation 0x00d06f83 __CFRunLoopRun + 979

24 CoreFoundation 0x00d06840 CFRunLoopRunSpecific + 208

25 CoreFoundation 0x00d06761 CFRunLoopRunInMode + 97

26 UIKit 0x002ba7d2 -[UIApplication _run] + 623

27 UIKit 0x002c6c93 UIApplicationMain + 1160
28 TableView 0x00002960 main + 102
29 TableView 0x000028f1 start + 53
30 ??? 0x00000001 0x0 + 1
)

terminate called after throwing an instance of 'NSException'

最佳答案

好吧,我不知道你想让我们告诉你什么,然后你的错误已经告诉你了。

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "RootViewController" nib but the view outlet was not set.'



那是您忘记连接 RootViewController 的 View 导出,因此它不知道要加载什么。 MainWindow 的 RootViewController 是要加载的第一件事,如果它不知道应该显示什么 View ,则会出现上述错误。

关于iphone - 修改 XIB 文件后应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6722933/

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