读书时间 2011/12/25 iPhone/iPad


《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


NOTE:
花了2小时仍未解决,但突然发现BlueView.xib的内容未设置好,重新设置(如BlueViewController, view outlet)后OK!
可能是文件系统出现问题或没有存盘?

2. Chap 7 
Pickers 

[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:解决其他人的程序在本地无法运行的问题?(安全证书方面的原因)


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值