2011-02-03 3 views
-2

次の例外を除いてアプリを実行中にエラーが発生します。iphoneアプリクラッシュ

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FavoriteViewController 0x158d30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key customCell.' 
    *** Call stack at first throw: 
    (
     0 CoreFoundation      0x314d0987 __exceptionPreprocess + 114 
     1 libobjc.A.dylib      0x319a149d objc_exception_throw + 24 
     2 CoreFoundation      0x314d0705 -[NSException dealloc] + 0 
     3 Foundation       0x31d28b4f -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 182 
     4 Foundation       0x31d2803b _NSSetUsingKeyValueSetter + 90 
     5 Foundation       0x31d29da3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 194 
     6 Foundation       0x31cdbb17 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 130 
     7 UIKit        0x33a8860f -[UIRuntimeOutletConnection connect] + 66 
     8 CoreFoundation      0x31473fc7 -[NSObject(NSObject) performSelector:] + 18 
     9 CoreFoundation      0x3147cd51 -[NSArray makeObjectsPerformSelector:] + 388 
     10 UIKit        0x33a87577 -[UINib instantiateWithOwner:options:] + 586 
     11 UIKit        0x33a88b39 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 92 
     12 Fridge        0x0001ab11 -[FavoriteViewController tableView:cellForRowAtIndexPath:] + 192 
     13 UIKit        0x33907a21 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 516 
     14 UIKit        0x339077f3 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 34 
     15 UIKit        0x33905d2d -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 936 
     16 UIKit        0x33904edd -[UITableView layoutSubviews] + 140 
     17 UIKit        0x338b10cf -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 26 
     18 CoreFoundation      0x3146ebbf -[NSObject(NSObject) performSelector:withObject:] + 22 
     19 QuartzCore       0x30a6c685 -[CALayer layoutSublayers] + 120 
     20 QuartzCore       0x30a6c43d CALayerLayoutIfNeeded + 184 
     21 QuartzCore       0x30a6656d _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 212 
     22 QuartzCore       0x30a66383 _ZN2CA11Transaction6commitEv + 190 
     23 QuartzCore       0x30a89f9d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 52 
     24 CoreFoundation      0x31460c59 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16 
     25 CoreFoundation      0x31460acd __CFRunLoopDoObservers + 412 
     26 CoreFoundation      0x314580cb __CFRunLoopRun + 854 
     27 CoreFoundation      0x31457c87 CFRunLoopRunSpecific + 230 
     28 CoreFoundation      0x31457b8f CFRunLoopRunInMode + 58 
     29 GraphicsServices     0x35d664ab GSEventRunModal + 114 
     30 GraphicsServices     0x35d66557 GSEventRun + 62 
     31 UIKit        0x338d5329 -[UIApplication _run] + 412 
     32 UIKit        0x338d2e93 UIApplicationMain + 670 
     33 Fridge        0x00002d77 main + 70 
     34 Fridge        0x00002d2c start + 40 
    ) 

答えて

5

エラーメッセージ:終了によるキャッチされない例外のアプリ「NSUnknownKeyException」、理由:「[のsetValue:forUndefinedKey:]:このクラスは、キー値コーディング準拠キーcustomCellためではありません」

...あなたのxibが "customCell"という名前のIBOutletを参照していますが、あなたのView ControllerにはそのIBOutletがなくなったことを意味します。 xibからcustomCellリファレンスを削除するか、IBOutletプロパティをビューコントローラに "customCell"という名前で追加する必要があります。

関連する問題