为了账号安全,请及时绑定邮箱和手机立即绑定

按照这样做好demo后,每次切换textview的时候都会终止运行,不知道是什么原因

返回信息如下:

2016-01-12 00:54:28.935 UITestingDemo[2736:109250] -[ViewController userName:]: unrecognized selector sent to instance 0x7fc7ba49b500

2016-01-12 00:54:28.940 UITestingDemo[2736:109250] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController userName:]: unrecognized selector sent to instance 0x7fc7ba49b500'

*** First throw call stack:

(

0   CoreFoundation                      0x000000010bc30885 __exceptionPreprocess + 165

1   libobjc.A.dylib                     0x000000010b6a9df1 objc_exception_throw + 48

2   CoreFoundation                      0x000000010bc38b5d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205

3   CoreFoundation                      0x000000010bb85e3a ___forwarding___ + 970

4   CoreFoundation                      0x000000010bb859e8 _CF_forwarding_prep_0 + 120

5   UIKit                               0x000000010bfda257 -[UIApplication sendAction:to:from:forEvent:] + 125

6   UIKit                               0x000000010bfda1b2 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 79

7   UIKit                               0x000000010c135422 -[UIControl sendAction:to:forEvent:] + 67

8   UIKit                               0x000000010c1356c6 -[UIControl _sendActionsForEvents:withEvent:] + 272

9   UIKit                               0x000000010c8f2fb9 -[UITextField _resignFirstResponder] + 299

10  UIKit                               0x000000010c1c8ffb -[UIResponder _finishResignFirstResponder] + 234

11  UIKit                               0x000000010c8f2de2 -[UITextField _finishResignFirstResponder] + 49

12  UIKit                               0x000000010c1c90b4 -[UIResponder resignFirstResponder] + 137

13  UIKit                               0x000000010c8f2caf -[UITextField resignFirstResponder] + 136

14  UIKit                               0x000000010c1c8d80 -[UIResponder becomeFirstResponder] + 366

15  UIKit                               0x000000010c07318e -[UIView(Hierarchy) becomeFirstResponder] + 138

16  UIKit                               0x000000010c8f1c5a -[UITextField becomeFirstResponder] + 51

17  UIKit                               0x000000010c47a003 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 287

18  UIKit                               0x000000010c47d997 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 3817

19  UIKit                               0x000000010c474447 _UIGestureRecognizerSendTargetActions + 153

20  UIKit                               0x000000010c46ed7e _UIGestureRecognizerSendActions + 162

21  UIKit                               0x000000010c46d577 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 611

22  UIKit                               0x000000010c473962 ___UIGestureRecognizerUpdate_block_invoke720 + 79

23  UIKit                               0x000000010c4737ec _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 342

24  UIKit                               0x000000010c466aaf _UIGestureRecognizerUpdate + 2759

25  UIKit                               0x000000010c0406d7 -[UIWindow _sendGesturesForEvent:] + 1137

26  UIKit                               0x000000010c0417c6 -[UIWindow sendEvent:] + 849

27  UIKit                               0x000000010bff6705 -[UIApplication sendEvent:] + 263

28  UIKit                               0x000000010bfd35df _UIApplicationHandleEventQueue + 6031

29  CoreFoundation                      0x000000010bb5b0f1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

30  CoreFoundation                      0x000000010bb50eac __CFRunLoopDoSources0 + 556

31  CoreFoundation                      0x000000010bb50363 __CFRunLoopRun + 867

32  CoreFoundation                      0x000000010bb4fd78 CFRunLoopRunSpecific + 488

33  GraphicsServices                    0x000000010f1eebca GraphicsServices + 52170

34  UIKit                               0x000000010bfd879b UIApplicationMain + 171

35  UITestingDemo                       0x000000010b1b0adf main + 111

36  libdyld.dylib                       0x000000010e19fa05 libdyld.dylib + 10757

37  ???                                 0x0000000000000001 0x0 + 1

)

libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb) 


正在回答

1 回答

看字面理解是selector的某个方法没有实例化,能不能把代码贴出来 大家一起分析分析?

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
iOS9新特性之UITesting
  • 参与学习       10940    人
  • 解答问题       12    个

iOS9新特性:不需要我们手指反复点击,完成APP自动化测试

进入课程

按照这样做好demo后,每次切换textview的时候都会终止运行,不知道是什么原因

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号