I\'m new to IOS programming, I\'m displaying a view when a button is clicked, using the following code inside the button method.
@IBAction func moreButton(_
In Swift 4
override func touchesBegan(_ touches: Set, with event: UIEvent?) { let touch = touches.first if touch?.view == self.view { commentsTxtView.resignFirstResponder() } }