目标C:未捕获的异常'NSUnknownKeyException'

时间:2011-11-10 02:25:02

标签: iphone objective-c ios xcode ipad

我有这个错误“线程1:编程接收信号:'SIGABRT'”在这一行......

[window addSubview:viewController.view];

这意味着什么?

以下是错误消息:

2011-11-10 10:01:08.334 Paint Brush[1624:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Paint_BrushViewController 0x4b1b1d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key clear.'
*** Call stack at first throw:
(

    0   CoreFoundation                      0x00dc25a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00f16313 objc_exception_throw + 44
    2   CoreFoundation                      0x00dc24e1 -[NSException raise] + 17
    3   Foundation                          0x00794677 _NSSetUsingKeyValueSetter + 135
    4   Foundation                          0x007945e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
    5   UIKit                               0x0021030c -[UIRuntimeOutletConnection connect] + 112
    6   CoreFoundation                      0x00d388cf -[NSArray makeObjectsPerformSelector:] + 239
    7   UIKit                               0x0020ed23 -[UINib instantiateWithOwner:options:] + 1041
    8   UIKit                               0x00210ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
    9   UIKit                               0x000c6628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
    10  UIKit                               0x000c4134 -[UIViewController loadView] + 120
    11  UIKit                               0x000c400e -[UIViewController view] + 56
    12  Paint Brush                         0x000024ae -[Paint_BrushAppDelegate application:didFinishLaunchingWithOptions:] + 94
    13  UIKit                               0x00014c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
    14  UIKit                               0x00016d88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
    15  UIKit                               0x00021617 -[UIApplication handleEvent:withNewEvent:] + 1533
    16  UIKit                               0x00019abf -[UIApplication sendEvent:] + 71
    17  UIKit                               0x0001ef2e _UIApplicationHandleEvent + 7576
    18  GraphicsServices                    0x00ffb992 PurpleEventCallback + 1550
    19  CoreFoundation                      0x00da3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    20  CoreFoundation                      0x00d03cf7 __CFRunLoopDoSource1 + 215
    21  CoreFoundation                      0x00d00f83 __CFRunLoopRun + 979
    22  CoreFoundation                      0x00d00840 CFRunLoopRunSpecific + 208
    23  CoreFoundation                      0x00d00761 CFRunLoopRunInMode + 97
    24  UIKit                               0x000167d2 -[UIApplication _run] + 623
    25  UIKit                               0x00022c93 UIApplicationMain + 1160
    26  Paint Brush                         0x00002419 main + 121
    27  Paint Brush                         0x00002395 start + 53
)

terminate called after throwing an instance of 'NSException'

1 个答案:

答案 0 :(得分:2)

在此类Paint_BrushAppDelegate中,您可能正在设置一个键,其中键可能不是正确的NSString。请检查您传递的语法或对象是否为关键字。请检查它是否为零。