으로 전송되면이 문제를 해결할 수 있습니까? 나는 몇 시간 동안 문제를 해결하려고 노력했지만 지금까지는 아무 일도 없었다. 단추를 클릭 할 때마다 즉시 Thread 1 : Signal SIGABRT 오류가 발생합니다. 스위프트 3 - 스레드 1 : 신호 SIGABRT 인식기가없는 인스턴스가 인스턴스
import UIKit
class ViewController: UIViewController {
@IBOutlet var Sec1: UILabel!
@IBOutlet var Sec2: UILabel!
@IBOutlet var Sec3: UILabel!
@IBOutlet var Sec4: UILabel!
@IBOutlet var Sec5: UILabel!
@IBOutlet var Sec6: UILabel!
@IBOutlet var Sec7: UILabel!
@IBOutlet var Sec8: UILabel!
@IBOutlet var Sec9: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
var x = 2
// if (x%2 == 0) {
@IBAction func ButtonPressed(Button1: UIButton) {
Sec1.text = "X"
}
}
이
는 오류입니다 :이
코드 (: 그것은 아직 진행중인 작품이다 참고)이다**2017-02-23 07:58:14.194 Tic Tac Toe IS[46707:2457511] -[Tic_Tac_Toe_IS.ViewController ButtonPressed:]: unrecognized selector sent to instance 0x7fb8a8d04ee0
2017-02-23 07:58:14.202 Tic Tac Toe IS[46707:2457511] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Tic_Tac_Toe_IS.ViewController ButtonPressed:]: unrecognized selector sent to instance 0x7fb8a8d04ee0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010bebfd4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001092be21e objc_exception_throw + 48
2 CoreFoundation 0x000000010bf2ff04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010be45005 ___forwarding___ + 1013
4 CoreFoundation 0x000000010be44b88 _CF_forwarding_prep_0 + 120
5 UIKit 0x000000010978f8bc -[UIApplication sendAction:to:from:forEvent:] + 83
6 UIKit 0x0000000109915c38 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x0000000109915f51 -[UIControl _sendActionsForEvents:withEvent:] + 444
8 UIKit 0x0000000109914e4d -[UIControl touchesEnded:withEvent:] + 668
9 UIKit 0x00000001097fd545 -[UIWindow _sendTouchesForEvent:] + 2747
10 UIKit 0x00000001097fec33 -[UIWindow sendEvent:] + 4011
11 UIKit 0x00000001097ab9ab -[UIApplication sendEvent:] + 371
12 UIKit 0x0000000109f9872d __dispatchPreprocessedEventFromEventQueue + 3248
13 UIKit 0x0000000109f91463 __handleEventQueue + 4879
14 CoreFoundation 0x000000010be64761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
15 CoreFoundation 0x000000010be4998c __CFRunLoopDoSources0 + 556
16 CoreFoundation 0x000000010be48e76 __CFRunLoopRun + 918
17 CoreFoundation 0x000000010be48884 CFRunLoopRunSpecific + 420
18 GraphicsServices 0x000000010ddf9a6f GSEventRunModal + 161
19 UIKit 0x000000010978dc68 UIApplicationMain + 159
20 Tic Tac Toe IS 0x0000000108cdb7af main + 111
21 libdyld.dylib 0x000000010ce6f68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)**
인터페이스 빌더를 사용하여 'IBAction' 메소드를 설정 했습니까? – zsteed
스토리 보드에서 동작 제거 및 코드 제거 및 readd 버튼 동작'@IBAction func ButtonPressed (_ 보낸 사람 : Any) {}' –
스토리 보드의 버튼을 View Controller로 끌었습니다 –