Created
May 28, 2015 13:44
-
-
Save azakordonets/2f1c43b02d4e2af80114 to your computer and use it in GitHub Desktop.
This two methods should be included into the file, so it would make keyboard disappear on Enter button push, or tap outside the keyboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { | |
| self.view.endEditing(true) | |
| } | |
| func textFieldShouldReturn(input: UITextField) -> Bool { | |
| input.resignFirstResponder() | |
| return true | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment