点击按钮出现错误:无法识别的选择器发送到实例 - IOS Swift 3
import UIKit
class Login: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func LoginButton(_ sender: UIButton) {
print("Login button")
}}
错误 2017-04-05 14:55:56.965 Design[3510:67974] 未知类登录 Interface Builder 文件。 2017-04-05 14:56:00.084 Design[3510:67974] -[UIView LoginButton:]:无法识别的选择器发送到实例 0x7ffa2f70c9b0 2017-04-05 14:56:00.093 Design[3510:67974] * 由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[UIView LoginButton:]:无法识别的选择器发送到实例 0x7ffa2f70c9b0” * 首先抛出调用堆栈: ( .... ) libc++abi.dylib:以 NSException 类型的未捕获异常终止
最佳答案
关于ios - 点击按钮出现错误: unrecognized selector sent to instance - IOS Swift 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43227496/