在我的应用程序中,每次启动应用程序时都会有一个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