我在 xcode 中遇到了一个奇怪的问题。我在 xib 中创建了一个按钮并连接到一个函数。我正在函数内打印消息。就是这样,当我单击按钮时,出现以下错误。我尝试从我的模拟器中清理并删除应用程序。
-(IBAction)languageSelection:(id)sender
是我的函数名
-[NSCFString languageSelection:]: unrecognized selector sent to instance 0x713cd40
2012-05-03 15:14:35.055 Example[33420:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString languageSelection:]: unrecognized selector sent to instance 0x713cd40'
*** Call stack at first throw:
(
0 CoreFoundation 0x02966919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02ab45de objc_exception_throw + 47
2 CoreFoundation 0x0296842b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x028d8116 ___forwarding___ + 966
4 CoreFoundation 0x028d7cd2 _CF_forwarding_prep_0 + 50
5 UIKit 0x005ece14 -[UIApplication sendAction:to:from:forEvent:] + 119
6 UIKit 0x006766c8 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x00678b4a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
8 UIKit 0x006776f7 -[UIControl touchesEnded:withEvent:] + 458
9 UIKit 0x006102ff -[UIWindow _sendTouchesForEvent:] + 567
10 UIKit 0x005f21ec -[UIApplication sendEvent:] + 447
11 UIKit 0x005f6ac4 _UIApplicationHandleEvent + 7495
12 GraphicsServices 0x02dedafa PurpleEventCallback + 1578
13 CoreFoundation 0x02947dc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
14 CoreFoundation 0x028a8737 __CFRunLoopDoSource1 + 215
15 CoreFoundation 0x028a59c3 __CFRunLoopRun + 979
16 CoreFoundation 0x028a5280 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x028a51a1 CFRunLoopRunInMode + 97
18 GraphicsServices 0x02dec2c8 GSEventRunModal + 217
19 GraphicsServices 0x02dec38d GSEventRun + 115
20 UIKit 0x005fab58 UIApplicationMain + 1160
21 Example 0x000023c9 main + 121
22 Example 0x00002345 start + 53
)
terminate called after throwing an instance of 'NSException'