0
안녕하세요 신속 제스처 인식기를 추가하며 이것은이에서 작업을해야 내가스위프트 출근 제스처 인식기 충돌 프로그램
2017-09-08 20:17:33.355 Views[40942:2309262] -[Views.ViewController handleSwipes:]: unrecognized selector sent to instance 0x7fdd9bc0dc90 2017-09-08 20:17:33.361 Views[40942:2309262] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Views.ViewController handleSwipes:]: unrecognized selector sent to instance 0x7fdd9bc0dc90' *** First throw call stack: ( 0 CoreFoundation 0x0000000111f40b0b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010f1e6141 objc_exception_throw + 48 2 CoreFoundation 0x0000000111fb0134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x0000000111ec7840 ___forwarding___ + 1024 4 CoreFoundation 0x0000000111ec73b8 _CF_forwarding_prep_0 + 120 5 UIKit 0x000000010fbecf59 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 57 6 UIKit 0x000000010fbf4d57 _UIGestureRecognizerSendTargetActions + 109 7 UIKit 0x000000010fbf270b _UIGestureRecognizerSendActions + 225 8 UIKit 0x000000010fbf19ce -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 981 9 UIKit 0x000000010fbde152 _UIGestureEnvironmentUpdate + 1219 10 UIKit 0x000000010fbddc43 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 484 11 UIKit 0x000000010fbdce0a -[UIGestureEnvironment _updateGesturesForEvent:window:] + 274 12 UIKit 0x000000010f728eea -[UIWindow sendEvent:] + 4092 13 UIKit 0x000000010f6d5a84 -[UIApplication sendEvent:] + 352 14 UIKit 0x000000010feb95d4 __dispatchPreprocessedEventFromEventQueue + 2926 15 UIKit 0x000000010feb1532 __handleEventQueue + 1122 16 CoreFoundation 0x0000000111ee6c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 17 CoreFoundation 0x0000000111ecc0cf __CFRunLoopDoSources0 + 527 18 CoreFoundation 0x0000000111ecb5ff __CFRunLoopRun + 911 19 CoreFoundation 0x0000000111ecb016 CFRunLoopRunSpecific + 406 20 GraphicsServices 0x0000000113ed7a24 GSEventRunModal + 62 21 UIKit 0x000000010f6b8134 UIApplicationMain + 159 22 Views 0x000000010ec06a67 main + 55 23 libdyld.dylib 0x0000000112f6c65d start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
let leftSwipe = UISwipeGestureRecognizer (대상 : 자기, 동작 : # 선택기 (핸들 스 와이프 : 송신자)) – antonio081014
보낸 사람 매개 변수 'handleSwipes (_ sender : UISwipeGestureRecognizer) {'앞에 밑줄을 추가하고 선택기를'#selector (handleSwipes)'로 변경하십시오. –
@LeoDabus가 작동했습니다. 감사합니다! – Cameron