在我的應用程序中,每次啓動應用程序時都會有一個UIAlertView顯示,如果我沒有點擊'Dismiss'按鈕,但是如果我點擊'Dismiss'按鈕,則應用程序會在約3秒鐘後崩潰。什麼導致這次事故?
我從控制檯的崩潰日誌,如果有人知道它爲什麼崩潰請讓我知道
2011-03-20 15:47:05.833 App[8080:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSCFString 0x6e04920> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mystatsbutton.'
*** Call stack at first throw:
(
0 CoreFoundation 0x01a71be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01bc65c2 objc_exception_throw + 47
2 CoreFoundation 0x01a71b21 -[NSException raise] + 17
3 Foundation 0x001016cf _NSSetUsingKeyValueSetter + 135
4 Foundation 0x0010163d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x005808d6 -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x019e82cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x0057f2ed -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x00581081 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x00439a94 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x00437709 -[UIViewController loadView] + 120
11 UIKit 0x004375e3 -[UIViewController view] + 56
12 App 0x000084e2 -[LoadupView endview] + 132
13 Foundation 0x0011f7a5 __NSFireTimer + 125
14 CoreFoundation 0x01a52fe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
15 CoreFoundation 0x01a54594 __CFRunLoopDoTimer + 1220
16 CoreFoundation 0x019b0cc9 __CFRunLoopRun + 1817
17 CoreFoundation 0x019b0240 CFRunLoopRunSpecific + 208
18 CoreFoundation 0x019b0161 CFRunLoopRunInMode + 97
19 GraphicsServices 0x02349268 GSEventRunModal + 217
20 GraphicsServices 0x0234932d GSEventRun + 115
21 UIKit 0x0039842e UIApplicationMain + 1160
22 App 0x000022de main + 84
23 App 0x00002281 start + 53
)
terminate called after throwing an instance of 'NSException'
在那張紙上,他需要檢查他的xib以確保一切正確連接。如果他右鍵點擊文件所有者並在任何網點發出警告,這可能是罪魁禍首。他需要刪除xib中的綁定或在其頭中創建一個IBOutlet。 – 2011-03-20 21:28:02
它雖然,但我仔細檢查我有mystatsbutton插座 – 2011-03-20 21:35:48