A small Swift Framework for hiding keyboard when the user tapped anywhere in UIViewcontroller.
pod 'HideKeyboardWhenTappedAround'
- Import
HideKeyboardWhenTappedAround
in only one UIViewController.
import HideKeyboardWhenTappedAround
- Call function
hideKeyboardWhenTappedAround()
in UIViewController'sviewDidLoad()
override func viewDidLoad() {
super.viewDidLoad()
// Hide Keyboard when Taped around
hideKeyboardWhenTappedAround()
...
}
MIT