Answers for "how to dismiss keyboard when touch up outside"

2

xcode hide keyboard when touch background storyboard

override func viewDidLoad()
    {
        super.viewDidLoad()
        
        //Hide Keyboard
        let tap = UITapGestureRecognizer(target: self.view, action: #selector(UIView.endEditing))
        view.addGestureRecognizer(tap)
    }
Posted by: Guest on October-08-2020

Code answers related to "how to dismiss keyboard when touch up outside"

Code answers related to "Swift"

Browse Popular Code Answers by Language