Skip to content

Instantly share code, notes, and snippets.

@angelsystem
Created November 5, 2014 04:51
Show Gist options
  • Save angelsystem/d17c20bc16270aeba592 to your computer and use it in GitHub Desktop.
Save angelsystem/d17c20bc16270aeba592 to your computer and use it in GitHub Desktop.
keyboard hide touch screen
import UIKit
class ViewController: UIViewController {
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
self.view.endEditing(true)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment