黑马程序员技术交流社区
标题:
【求助】Xcode过一会就会报错
[打印本页]
作者:
medicine
时间:
2015-12-9 18:52
标题:
【求助】Xcode过一会就会报错
今天按照挂网Swift教程做练习。很奇怪,同样的代码,如果打得慢点,就会运行失败,编译没有问题,就是运行的时候出现这个错误。删除project重新来过,同样的代码,只是打的快一些,就可以了。然后过一会又会出现一次。一下错误中的myLabel的变量我都改了名字了,可是报错还是会出现。我都怀疑会不会像浏览器一样有缓存的概念啊?问题如下,请大虾帮忙:
2015-08-26 21:09:50.877 FoodTracker[3437:819515] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FoodTracker.ViewController 0x7fcbb9414f00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myLabel.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001011d8c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000102d43bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001011d88a9 -[NSException raise] + 9
3 Foundation 0x00000001015f6b53 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x0000000101120d50 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x0000000101d4f4eb -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x0000000101ba76d8 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x0000000101ba7cc8 -[UIViewController loadView] + 109
8 UIKit 0x0000000101ba7f39 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x0000000101ba83ce -[UIViewController view] + 27
10 UIKit 0x0000000101ac3289 -[UIWindow addRootViewControllerViewIfPossible] + 58
11 UIKit 0x0000000101ac364f -[UIWindow _setHidden:forced:] + 247
12 UIKit 0x0000000101acfde1 -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x0000000101a73417 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2732
14 UIKit 0x0000000101a7619e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1349
15 UIKit 0x0000000101a75095 -[UIApplication workspaceDidEndTransaction:] + 179
16 FrontBoardServices 0x00000001048405e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
17 CoreFoundation 0x000000010110c41c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
18 CoreFoundation 0x0000000101102165 __CFRunLoopDoBlocks + 341
19 CoreFoundation 0x0000000101101923 __CFRunLoopRun + 851
20 CoreFoundation 0x0000000101101366 CFRunLoopRunSpecific + 470
21 UIKit 0x0000000101a74b02 -[UIApplication _run] + 413
22 UIKit 0x0000000101a778c0 UIApplicationMain + 1282
23 FoodTracker 0x0000000100fdeed7 main + 135
24 libdyld.dylib 0x0000000103479145 start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
作者:
沐子羊
时间:
2015-12-9 18:58
6666666666666666
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2