Ios 使用swift卸下键盘

Ios 使用swift卸下键盘,ios,swift,keyboard,Ios,Swift,Keyboard,我想删除键盘后,我完成了键入通过点击任何地方的框,所以我写了这个 override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent!) { self.view.endEditing(true) } override func touchsbegind(touchs:Set,withEvent-event:UIEvent!){ self.view.endEditing(tr

我想删除键盘后,我完成了键入通过点击任何地方的框,所以我写了这个

 override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent!) {
        self.view.endEditing(true)
    }
override func touchsbegind(touchs:Set,withEvent-event:UIEvent!){
self.view.endEditing(true)
}
但是它说我并没有覆盖Super-class中的任何方法。但是为什么呢?:)

对于Swift 2,使用:

override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?)
覆盖函数触摸开始(触摸:设置,withEvent事件:UIEvent?)