【发布时间】:2016-10-10 19:14:27
【问题描述】:
我有以下代码:
override func viewDidLoad() {
super.viewDidLoad()
//Looks for single or multiple taps.
let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: "dismissKeyboard")
view.addGestureRecognizer(tap)
// Do any additional setup after loading the view.
}
func dismissKeyboard() {
//Causes the view (or one of its embedded text fields) to resign the first responder status.
view.endEditing(true)
}
当运行应用程序时发生此错误,当错误修复工作发生另一个错误时
【问题讨论】: