override func viewDidLoad() {
super.viewDidLoad()
self.hideKeyboardWhenTappedAround();
// Do any additional setup after loading the view.
}
func hideKeyboardWhenTappedAround() {
let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard))
tap.cancelsTouchesInView = false
view.addGestureRecognizer(tap)
}
@objc func dismissKeyboard() {
view.endEditing(true)
}