《Objective-C基础教程》
1. Chap 7 深入了解XCode
N多快捷键使用方法
《iPhone3 开发基础教程》
1. Chap 6 多视图应用
*内容视图与根视图控制器
* error: crash !
SwitchViewController::viewDidLoad...
- (void)viewDidLoad {
BlueViewController *blueController = [[BlueViewControlleralloc]
^ blueViewController引直名字hidden initWithNibName:@"BlueView"
bundle:nil ];
self.blueViewController = blueController;
[self.viewinsertSubview:blueController.viewatIndex:0];
^ missing view , 此句crash!
[blueControllerrelease];
[superviewDidLoad];
}
Current language: auto; currently objective-c
2011-12-25 11:39:51.741 ViewSwitcher[1102:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "BlueView" nib but the view outlet was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc25a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f16313 objc_exception_throw + 44
2 CoreFoundation 0x00d7aef8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00d7ae6a +[NSException raise:format:] + 58
4 UIKit 0x00364709 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x00362134 -[UIViewController loadView] + 120
6 UIKit 0x0036200e -[UIViewController view] + 56
7 ViewSwitcher 0x00002c53 -[SwitchViewController viewDidLoad] + 165
8 UIKit 0x004acf26 -[UINib instantiateWithOwner:options:] + 1556
9 UIKit 0x004aeab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
10 UIKit 0x002b417a -[UIApplication _loadMainNibFile] + 172
11 UIKit 0x002b4cf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
12 UIKit 0x002bf617 -[UIApplication handleEvent:withNewEvent:] + 1533
13 UIKit 0x002b7abf -[UIApplication sendEvent:] + 71
14 UIKit 0x002bcf2e _UIApplicationHandleEvent + 7576
15 GraphicsServices 0x0171a992 PurpleEventCallback + 1550
16 CoreFoundation 0x00da3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
17 CoreFoundation 0x00d03cf7 __CFRunLoopDoSource1 + 215
18 CoreFoundation 0x00d00f83 __CFRunLoopRun + 979
19 CoreFoundation 0x00d00840 CFRunLoopRunSpecific + 208
20 CoreFoundation 0x00d00761 CFRunLoopRunInMode + 97
21 UIKit 0x002b47d2 -[UIApplication _run] + 623
22 UIKit 0x002c0c93 UIApplicationMain + 1160
23 ViewSwitcher 0x00002608 main + 102
24 ViewSwitcher 0x00002599 start + 53
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
kill
quit
[Session started at 2011-12-25 20:11:31 +0800.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 2278.
Pending breakpoint 1 - ""PickersAppDelegate.m":26" resolved
2011-12-25 20:11:33.110 Pickers[2278:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<PickersAppDelegate 0x4e0c350> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key viewController.'
^ 在IB中将viewController相关的outlet删除,OK!
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc15a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f15313 objc_exception_throw + 44
2 CoreFoundation 0x00dc14e1 -[NSException raise] + 17
3 Foundation 0x00029677 _NSSetUsingKeyValueSetter + 135
4 Foundation 0x000295e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x004ad30c -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00d378cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x004abd23 -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x004adab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x002b317a -[UIApplication _loadMainNibFile] + 172
10 UIKit 0x002b3cf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
11 UIKit 0x002be617 -[UIApplication handleEvent:withNewEvent:] + 1533
12 UIKit 0x002b6abf -[UIApplication sendEvent:] + 71
13 UIKit 0x002bbf2e _UIApplicationHandleEvent + 7576
14 GraphicsServices 0x01719992 PurpleEventCallback + 1550
15 CoreFoundation 0x00da2944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
16 CoreFoundation 0x00d02cf7 __CFRunLoopDoSource1 + 215
17 CoreFoundation 0x00cfff83 __CFRunLoopRun + 979
18 CoreFoundation 0x00cff840 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00cff761 CFRunLoopRunInMode + 97
20 UIKit 0x002b37d2 -[UIApplication _run] + 623
21 UIKit 0x002bfc93 UIApplicationMain + 1160
22 Pickers 0x00001d8c main + 102
23 Pickers 0x00001d1d start + 53
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
(gdb)
杂问:
Q:[SwitchViewController release]与[switchViewController release]都work ?
Q:在XCode中如何打开一个指定的任意文件?
Q:解决其他人的程序在本地无法运行的问题?(安全证书方面的原因)