0
因此,我只是更新到迅速1.2,现在我的代码辞职键盘不会工作?辞职键盘迅速1.2
的代码是:
override func touchesBegan(touches:NSSet, withEvent event: UIEvent) {
self.view.endEditing(true)
错误说重写方法与选择器 “的touchesBegan:withEvent:方法” 具有不兼容的类型
因此,我只是更新到迅速1.2,现在我的代码辞职键盘不会工作?辞职键盘迅速1.2
的代码是:
override func touchesBegan(touches:NSSet, withEvent event: UIEvent) {
self.view.endEditing(true)
错误说重写方法与选择器 “的touchesBegan:withEvent:方法” 具有不兼容的类型
尝试用Set<NSObject>
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
self.view.endEditing(true)
}
的语法具有取代NSSet
在swift 1.2中进行了编辑。该NSSet
被Set<NSObject>