0

I want to remove the keyboard after I am done with typing by clicking any where out of the box so I wrote this

 override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent!) {
        self.view.endEditing(true)
    }

but it says that I am not overriding any method from the supper-class.But howcome ?:)

1 Answers1

0

For Swift 2, using:

override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?)
tuledev
  • 10,177
  • 4
  • 29
  • 49