林没有得到任何编译时错误,也没有任何事情,当我运行构建&分析后,我无法找到这事。但是在运行时,当我点击一个uitextfield时,我的应用程序崩溃。应用程序与此错误消息崩溃 - 谷歌搜索它 - 有人可以帮助请
-[__NSCFType textFieldDidBeginEditing:]: unrecognized selector sent to instance 0x583cb90
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType textFieldDidBeginEditing:]: unrecognized selector sent to instance 0x583cb90'
0 CoreFoundation 0x00fa25a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x010f6313 objc_exception_throw + 44
2 CoreFoundation 0x00fa40bb -[NSObject(NSObject)doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00f13966 ___forwarding___ + 966
4 CoreFoundation 0x00f13522 _CF_forwarding_prep_0 + 50
5 UIKit 0x00394581 -[UIControl(Deprecated) sendAction:toTarget:forEvent:] + 67
6 UIKit 0x00396e62 -[UIControl(Internal) _sendActionsForEventMask:withEvent:] +
7 UIKit 0x0039ce11 -[UITextField willAttachFieldEditor:] + 404
8 UIKit 0x003aecdf -[UIFieldEditor becomeFieldEditorForView:] + 653
9 UIKit 0x0039ef98 -[UITextField _becomeFirstResponder] + 99
林看代码再次和IB,以确定我加了一些堆栈跟踪从我的控制台同时这种可能性......如果这能帮助你给我更多的信息..... – banditKing 2011-05-11 01:54:48
+1你需要检查发送Editing Did Begin事件的对象是否符合'UITextFieldDelegate'协议。如果这是你做(这应该是)一类,加上''在文件的顶部在类名后(如:'MyCustomClass:NSObject的'),然后你应该得到一个编译器警告,如果你没有正确写出这个方法。您需要实现的方法签名如下所示:' - (void)textFieldDidBeginEditing:(UITextField *)textField' –
darvids0n
2011-05-11 02:12:58