I put a function in my code like this:
func textFieldShouldReturn(_ textField: UITextField) -> Bool
{
textfield.resignFirstResponder()
return true
}
where textfield is connect to a UITextField item.
@IBOutlet weak var textfield: UITextField!
but when I run the program, actually I cannot hide it wherever I tap or click. Could you please help me to solve it?