I have the following code:
 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)
}
When running the application This error occurs when the work of error repair another mistake happens
 
     
     
     
    