Reputation: 22988
In Xcode 5.0.2 I've created a new Master-Detail Application - and it worked well on iPhone and iPad simulators.
But then accidentally in User Defined Runtime Attribites in the right panel of Xcode I've clicked (three times) a plus and added "keyPath" entries (without really understanding what they are):
How can I remove them please? Clicking a minus doesn't change anything and running in simulator now fails with:
2013-11-24 21:02:53.003 MDExample[23132:a0b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableView 0xab26000> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.'
*** First throw call stack:
(
0 CoreFoundation 0x0173c5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014bf8b6 objc_exception_throw + 44
2 CoreFoundation 0x017cc6a1 -[NSException raise] + 17
3 Foundation 0x011809ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x010eccfb _NSSetUsingKeyValueSetter + 88
5 Foundation 0x010ec253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 UIKit 0x00297e0b -[UIView(CALayerDelegate) setValue:forKey:] + 168
7 Foundation 0x0114e70a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
8 UIKit 0x007aa0c5 -[UINibKeyValuePair apply] + 70
9 libobjc.A.dylib 0x014d17d2 -[NSObject performSelector:] + 62
10 CoreFoundation 0x01737b6a -[NSArray makeObjectsPerformSelector:] + 314
11 UIKit 0x004ce552 -[UINib instantiateWithOwner:options:] + 1389
12 UIKit 0x00340605 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
13 UIKit 0x00340dad -[UIViewController loadView] + 302
14 UIKit 0x004e911e -[UITableViewController loadView] + 80
15 UIKit 0x003410ae -[UIViewController loadViewIfRequired] + 78
16 UIKit 0x003415b4 -[UIViewController view] + 35
17 UIKit 0x0036bca9 -[UINavigationController rotatingSnapshotViewForWindow:] + 52
18 UIKit 0x00695a60 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 420
19 UIKit 0x002712f2 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1495
20 UIKit 0x00270d16 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 82
21 UIKit 0x00270be8 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 117
22 UIKit 0x00270c70 -[UIWindow _setRotatableViewOrientation:duration:force:] + 67
23 UIKit 0x0026fd0a __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 120
24 UIKit 0x0026fc6c -[UIWindow _updateToInterfaceOrientation:duration:force:] + 400
25 UIKit 0x002709c3 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:] + 870
26 UIKit 0x00273fb6 -[UIWindow setDelegate:] + 449
27 UIKit 0x00345737 -[UIViewController _tryBecomeRootViewControllerInWindow:] + 180
28 UIKit 0x00269c1c -[UIWindow addRootViewControllerViewIfPossible] + 609
29 UIKit 0x00269d97 -[UIWindow _setHidden:forced:] + 312
30 UIKit 0x0026a02d -[UIWindow _orderFrontWithoutMakingKey] + 49
31 UIKit 0x0027489a -[UIWindow makeKeyAndVisible] + 65
32 UIKit 0x00227cd0 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1851
33 UIKit 0x0022c3a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
34 UIKit 0x0024087c -[UIApplication handleEvent:withNewEvent:] + 3447
35 UIKit 0x00240de9 -[UIApplication sendEvent:] + 85
36 UIKit 0x0022e025 _UIApplicationHandleEvent + 736
37 GraphicsServices 0x036932f6 _PurpleEventCallback + 776
38 GraphicsServices 0x03692e01 PurpleEventCallback + 46
39 CoreFoundation 0x016b7d65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
40 CoreFoundation 0x016b7a9b __CFRunLoopDoSource1 + 523
41 CoreFoundation 0x016e277c __CFRunLoopRun + 2156
42 CoreFoundation 0x016e1ac3 CFRunLoopRunSpecific + 467
43 CoreFoundation 0x016e18db CFRunLoopRunInMode + 123
44 UIKit 0x0022badd -[UIApplication _run] + 840
45 UIKit 0x0022dd3b UIApplicationMain + 1225
46 MDExample 0x00003b3d main + 141
47 libdyld.dylib 0x01d78725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Upvotes: 0
Views: 1295
Reputation: 43330
User Defined Runtime Attributes are just that: User defined keypaths that may not be available in the standard interface builder editor for a given class/control. When you click to add one, you instruct the NIB defroster to call setValue:forKey:
, in this case with the keypath keyPath
and the value NO
(or rather, @NO
). Naturally, as UITableView
has no keypath or property named keyPath
, the KVC mechanism will crash.
To remove one, it must be highlighted, then either the delete key or the "minus button" will work:
If the problem persists, file a bug report.
Upvotes: 1