我想在ContainerView中显示静态单元格,但每次应用程序运行时,它都会在开始时崩溃。我在UITableView中读到了无法使用静态单元格的地方但是说它应该在容器视图中工作到UITableViewController。感谢您的任何意见。
2014-01-01 15:44:56.294 InterestingGame[24199:a0b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x8935970> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key second.'
*** First throw call stack:
(
0 CoreFoundation 0x0173d5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014c08b6 objc_exception_throw + 44
2 CoreFoundation 0x017cd6a1 -[NSException raise] + 17
3 Foundation 0x011819ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x010edcfb _NSSetUsingKeyValueSetter + 88
5 Foundation 0x010ed253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x0114f70a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7 UIKit 0x004d0a15 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x014d27d2 -[NSObject performSelector:] + 62
9 CoreFoundation 0x01738b6a -[NSArray makeObjectsPerformSelector:] + 314
10 UIKit 0x004cf56e -[UINib instantiateWithOwner:options:] + 1417
11 UIKit 0x00762a2f -[UIStoryboard instantiateViewControllerWithIdentifier:] + 220
12 UIKit 0x00762ba8 -[UIStoryboard instantiateInitialViewController] + 74
13 UIKit 0x0022e44c -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 79
14 UIKit 0x0022e6e9 -[UIApplication _loadMainInterfaceFile] + 245
15 UIKit 0x0022d28f -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
16 UIKit 0x0024187c -[UIApplication handleEvent:withNewEvent:] + 3447
17 UIKit 0x00241de9 -[UIApplication sendEvent:] + 85
18 UIKit 0x0022f025 _UIApplicationHandleEvent + 736
19 GraphicsServices 0x036942f6 _PurpleEventCallback + 776
20 GraphicsServices 0x03693e01 PurpleEventCallback + 46
21 CoreFoundation 0x016b8d65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
22 CoreFoundation 0x016b8a9b __CFRunLoopDoSource1 + 523
23 CoreFoundation 0x016e377c __CFRunLoopRun + 2156
24 CoreFoundation 0x016e2ac3 CFRunLoopRunSpecific + 467
25 CoreFoundation 0x016e28db CFRunLoopRunInMode + 123
26 UIKit 0x0022cadd -[UIApplication _run] + 840
27 UIKit 0x0022ed3b UIApplicationMain + 1225
28 InterestingGame 0x0000473d main + 141
29 libdyld.dylib 0x01d79725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
答案 0 :(得分:6)
该异常指向在界面构建器中连接的插座,该插座可能不再具有底层属性。
您之前可能在代码中声明了second
属性,然后将其连接到xib / storyboard中。然后,您将删除此属性或重命名该属性,而不会破坏xib / storyboard中的连接。您需要转到界面构建器中的连接面板并删除已断开的连接