2

My App Was Crashed With an NSUnknownKeyException.I don't know why this crash has happened

My Crash Report is

Terminating app due to uncaught exception 'NSUnknownKeyException', reason:   
'[<TransactionsViewController 0x8a6bbe0> setValue:forUndefinedKey:]: this class is not
key value coding-compliant for the key sidebarButton.'

*** First throw call stack:
(
0   CoreFoundation                      0x017615e4 __exceptionPreprocess + 180
1   libobjc.A.dylib                     0x014e48b6 objc_exception_throw + 44
2   CoreFoundation                      0x017f16a1 -[NSException raise] + 17
3   Foundation                          0x011a59ee -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4   Foundation                          0x01111cfb _NSSetUsingKeyValueSetter + 88
5   Foundation                          0x01111253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6   Foundation                          0x0117370a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
7   UIKit                               0x004f4a15 -[UIRuntimeOutletConnection connect] + 106
8   libobjc.A.dylib                     0x014f67d2 -[NSObject performSelector:] + 62
9   CoreFoundation                      0x0175cb6a -[NSArray makeObjectsPerformSelector:] + 314
10  UIKit                               0x004f356e -[UINib instantiateWithOwner:options:] + 1417
11  UIKit                               0x00786a2f -[UIStoryboard instantiateViewControllerWithIdentifier:] + 220
12  UIKit                               0x00787028 -[UIStoryboardSegueTemplate _perform:] + 88
13  UIKit                               0x007870f9 -[UIStoryboardSegueTemplate perform:] + 115
14  libobjc.A.dylib                     0x014f6874 -[NSObject performSelector:withObject:withObject:] + 77
15  UIKit                               0x002540c2 -[UIApplication sendAction:to:from:forEvent:] + 108
16  UIKit                               0x0025404e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
17  UIKit                               0x0034c0c1 -[UIControl sendAction:to:forEvent:] + 66
18  UIKit                               0x0034c484 -[UIControl _sendActionsForEvents:withEvent:] + 577
19  UIKit                               0x0034b733 -[UIControl touchesEnded:withEvent:] + 641
20  UIKit                               0x0029151d -[UIWindow _sendTouchesForEvent:] + 852
21  UIKit                               0x00292184 -[UIWindow sendEvent:] + 1232
22  UIKit                               0x00265e86 -[UIApplication sendEvent:] + 242
23  UIKit                               0x0025018f _UIApplicationHandleEventQueue + 11421
24  CoreFoundation                      0x016ea83f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
25  CoreFoundation                      0x016ea1cb __CFRunLoopDoSources0 + 235
26  CoreFoundation                      0x0170729e __CFRunLoopRun + 910
27  CoreFoundation                      0x01706ac3 CFRunLoopRunSpecific + 467
28  CoreFoundation                      0x017068db CFRunLoopRunInMode + 123
29  GraphicsServices                    0x037069e2 GSEventRunModal + 192
30  GraphicsServices                    0x03706809 GSEventRun + 104
31  UIKit                               0x00252d3b UIApplicationMain + 1225
32  FortabBar                           0x000049ad main + 141
33  libdyld.dylib                       0x01d9f70d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

can any one help me to solve this problem

Akhilrajtr
  • 5,170
  • 3
  • 19
  • 30

1 Answers1

1

You've connected something (a UIButton, presumably) in Interface Builder to a TransactionsViewController under the name sidebarButton, but a TransactionsViewController doesn't have an outlet with that name. You either need to declare the outlet on your TransactionsViewController class:

@property (nonatomic, weak) IBOutlet UIButton *sidebarButton;

or you need to remove that connection in Interface Builder.

Tim
  • 59,527
  • 19
  • 156
  • 165
  • Yes i done it.Its problem related with declaration of sidebarButton –  Jan 28 '14 at 04:15