Created
April 3, 2016 02:42
-
-
Save katsuhide/a2d6401c936df1c10dcde96ec72ef8a3 to your computer and use it in GitHub Desktop.
[iOS]フォーカスが外れたタイミングでキーボードを隠す ref: http://qiita.com/katzhide/items/8bab35e027fca49654c8
This file contains 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
import UIKit | |
class ViewController: UIViewController, UITextFieldDelegate { | |
@IBOutlet weak var textField: UITextField! | |
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { | |
view.endEditing(true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment