0

私のアプリケーションはうまく機能しましたが、変更を加えたとき(どのような変更をしたかは覚えていません)、コンソールに次のメッセージが表示されました。

[Session started at 2010-11-21 17:15:36 -0500.]
2010-11-21 17:15:37.472 ITMFR[3942:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x6a50d90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'
*** Call stack at first throw:
(
 0   CoreFoundation                      0x021f2b99 __exceptionPreprocess + 185
 1   libobjc.A.dylib                     0x0234240e objc_exception_throw + 47
 2   CoreFoundation                      0x021f2ad1 -[NSException raise] + 17
 3   Foundation                          0x000320f3 _NSSetUsingKeyValueSetter + 135
 4   Foundation                          0x00032061 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
 5   UIKit                               0x004b070a -[UIRuntimeOutletConnection connect] + 112
 6   CoreFoundation                      0x02168d0f -[NSArray makeObjectsPerformSelector:] + 239
 7   UIKit                               0x004af121 -[UINib instantiateWithOwner:options:] + 1041
 8   UIKit                               0x004b0eb5 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
 9   UIKit                               0x002bc402 -[UIApplication _loadMainNibFile] + 172
 10  UIKit                               0x002bd31c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 198
 11  UIKit                               0x002c73ec -[UIApplication handleEvent:withNewEvent:] + 1958
 12  UIKit                               0x002bfb3c -[UIApplication sendEvent:] + 71
 13  UIKit                               0x002c49bf _UIApplicationHandleEvent + 7672
 14  GraphicsServices                    0x02ad2822 PurpleEventCallback + 1550
 15  CoreFoundation                      0x021d3ff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
 16  CoreFoundation                      0x02134807 __CFRunLoopDoSource1 + 215
 17  CoreFoundation                      0x02131a93 __CFRunLoopRun + 979
 18  CoreFoundation                      0x02131350 CFRunLoopRunSpecific + 208
 19  CoreFoundation                      0x02131271 CFRunLoopRunInMode + 97
 20  UIKit                               0x002bcc6d -[UIApplication _run] + 625
 21  UIKit                               0x002c8af2 UIApplicationMain + 1160
 22  ITMFR                               0x00003eb8 main + 102
 23  ITMFR                               0x000028e9 start + 53
 24  ???                                 0x00000001 0x0 + 1

)「NSException」のインスタンスをスローした後に呼び出された終了

私を助けてください!!

4

2 に答える 2

1

クラッシュレポートから、あなたが行った変更は、InterfaceBuilderのnib/ xibファイル、特にボタン/コントロールへの値のバインドであったと思います。すべてのUIコントロールのインスペクターをチェックして、共有ユーザーデフォルトコントローラーにバインドされているボタンバインディングにコントローラーキーvaluesがあり、他のものがないことを確認します。

于 2010-11-21T22:37:26.253 に答える
0

@synthesize を忘れたので、これは私に起こりました。

@synthesize window;

私のビューコントローラーで。

于 2011-11-22T01:25:34.583 に答える