我是編程新手,現在我正在編寫6個視圖的應用程序。 我的程序開始不是真的,我只看到背景--default.png - 然後prpgramm崩潰,但我看到默認圖像。 另外我有問題了解我收到的警告,它就像一種新的語言。 如果你知道一本書或頁面如何將這種警告解碼這將是非常有益的太Objective-C警告 - 我錯過了什麼或錯在哪裏?
2011-10-10 17:22:16.249 TestTest[2642:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "TestTestViewController" nib but the view outlet was not set.'
(
0 CoreFoundation 0x00ec25a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01016313 objc_exception_throw + 44
2 CoreFoundation 0x00e7aef8 +[NSExceptionraise:format:arguments:] + 136
3 CoreFoundation 0x00e7ae6a +[NSException raise:format:] + 58
4 UIKit 0x0036b709 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x00369134 -[UIViewController loadView] + 120
6 UIKit 0x0036900e -[UIViewController view] + 56
7 UIKit 0x002dcd42 -[UIWindow addRootViewControllerViewIfPossible] + 51
8 UIKit 0x002dc22d -[UIWindow _setHidden:forced:] + 303
9 UIKit 0x002dc01d -[UIWindow _orderFrontWithoutMakingKey] + 50
10 UIKit 0x002dacd1 -[UIWindow makeKeyAndVisible] + 39
11 TestTest 0x000026be -[TestTestAppDelegate application:didFinishLaunchingWithOptions:] + 135
12 UIKit 0x002b9c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
13 UIKit 0x002bbd88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
14 UIKit 0x002c6617 -[UIApplication handleEvent:withNewEvent:] + 1533
15 UIKit 0x002beabf -[UIApplication sendEvent:] + 71
16 UIKit 0x002c3f2e _UIApplicationHandleEvent + 7576
17 GraphicsServices 0x0181a992 PurpleEventCallback + 1550
18 CoreFoundation 0x00ea3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
19 CoreFoundation 0x00e03cf7 __CFRunLoopDoSource1 + 215
20 CoreFoundation 0x00e00f83 __CFRunLoopRun + 979
21 CoreFoundation 0x00e00840 CFRunLoopRunSpecific + 208
22 CoreFoundation 0x00e00761 CFRunLoopRunInMode + 97
23 UIKit 0x002bb7d2 -[UIApplication _run] + 623
24 UIKit 0x002c7c93 UIApplicationMain + 1160
25 TestTest 0x00002614 main + 102
26 TestTest 0x000025a5 start + 53
27 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
Program received signal: 「SIGABRT」.
kill
quit
The Debugger has exited with status 0.(gdb)
預先感謝您
有時我會對結構感到困惑,因爲我不知道在哪些方法中我必須編寫代碼。我自己學習Objective-C,我的講座沒有用處。你怎麼知道你會提出所有的和哪本書? – Studie
蘋果的文檔相當不錯。訣竅是它沒有像書本那樣組織起來。這就像一堆散落的章節。在這種情況下,你應該閱讀視圖控制器編程指南。一般來看看入門文檔。這會給你鏈接到幾個你可能需要開始的「章節」。 – morningstar
@morningstar謝謝你的建議 – Studie