I have a problem on iOS Development with Swift Tutorial - 14 - Hide Keyboard and First Responder

+1 Owen Wang · August 4, 2016
I wrote the code the same way Bucky did. But 2 errors came up,can everyone check my code below 

import UIKit



class ViewController: UIViewController {



    

    @IBOutlet weak var Email: UITextField!

    @IBOutlet weak var Password: UITextField!

    @IBAction func buttonPressed(sender: UIButton) {

    self.Email.resignFirstResponder()

    self.Password.resignFirstResponder()

    

    

    }



    override func touchesBegan(touches: NSSet, withEvent event: UIEvent?) {

        <#code#>; self.view.endEditing(true)

   }

    

    }











Post a Reply

Replies

Oldest  Newest  Rating
0 Kevin Gonzalez · August 18, 2016
Delete the <#code#>;
Good Luck!
  • 1

iOS Development / Swift

128,093 followers
About

This forum is for questions, comments, and general discussion about iOS Development and Swift.

Links
Moderators
Bucky Roberts Administrator