iphone app运行时异常

时间:2014-02-14 08:06:52

标签: iphone ios6

2014-02-14 13:30:41.013 MyInvitationCard[2043:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<CardIndexViewController 0x8d34d60> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key CardLabel.'
*** First throw call stack:
(
    0   CoreFoundation                      0x017435e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x014c68b6 objc_exception_throw + 44
    2   CoreFoundation                      0x017d36a1 -[NSException raise] + 17
    3   Foundation                          0x011879ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
    4   Foundation                          0x010f3cfb _NSSetUsingKeyValueSetter + 88
    5   Foundation                          0x010f3253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
    6   Foundation                          0x0115570a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
    7   UIKit                               0x004d6a15 -[UIRuntimeOutletConnection connect] + 106
    8   libobjc.A.dylib                     0x014d87d2 -[NSObject performSelector:] + 62
    9   CoreFoundation                      0x0173eb6a -[NSArray makeObjectsPerformSelector:] + 314
    10  UIKit                               0x004d556e -[UINib instantiateWithOwner:options:] + 1417
    11  UIKit                               0x00347605 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
    12  UIKit                               0x00347dad -[UIViewController loadView] + 302
    13  UIKit                               0x003480ae -[UIViewController loadViewIfRequired] + 78
    14  UIKit                               0x003485b4 -[UIViewController view] + 35
    15  UIKit                               0x003623e2 -[UINavigationController _startCustomTransition:] + 778
    16  UIKit                               0x0036f0c7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 688
    17  UIKit                               0x0036fcb9 -[UINavigationController __viewWillLayoutSubviews] + 57
    18  UIKit                               0x004a9181 -[UILayoutContainerView layoutSubviews] + 213
    19  UIKit                               0x0029f267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
    20  libobjc.A.dylib                     0x014d881f -[NSObject performSelector:withObject:] + 70
    21  QuartzCore                          0x03b512ea -[CALayer layoutSublayers] + 148
    22  QuartzCore                          0x03b450d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
    23  QuartzCore                          0x03b44f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
    24  QuartzCore                          0x03aacae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
    25  QuartzCore                          0x03aade71 _ZN2CA11Transaction6commitEv + 393
    26  QuartzCore                          0x03aae544 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
    27  CoreFoundation                      0x0170b4ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
    28  CoreFoundation                      0x0170b41f __CFRunLoopDoObservers + 399
    29  CoreFoundation                      0x016e9344 __CFRunLoopRun + 1076
    30  CoreFoundation                      0x016e8ac3 CFRunLoopRunSpecific + 467
    31  CoreFoundation                      0x016e88db CFRunLoopRunInMode + 123
    32  GraphicsServices                    0x036e89e2 GSEventRunModal + 192
    33  GraphicsServices                    0x036e8809 GSEventRun + 104
    34  UIKit                               0x00234d3b UIApplicationMain + 1225
    35  MyInvitationCard                    0x000070bd main + 141
    36  libdyld.dylib                       0x01d8170d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

2 个答案:

答案 0 :(得分:1)

检查.xib文件并查找“!”出口标签中的标记。似乎您在.h / .m文件中更改了插座名称,但忘记在.xib中重新连接它。

查看更多信息here

答案 1 :(得分:0)

在推送 viewController 时,检查您提供的 xib 名称。可能是您在分配期间将不同的 xib 名称传递给其他 viewController 。 另外,请检查 IBOutlet 连接。