Skip to content

Instantly share code, notes, and snippets.

@KrauserHuang
Created March 8, 2022 09:07
Show Gist options
  • Select an option

  • Save KrauserHuang/51156a0f0eb0974c7c0baeae4771f335 to your computer and use it in GitHub Desktop.

Select an option

Save KrauserHuang/51156a0f0eb0974c7c0baeae4771f335 to your computer and use it in GitHub Desktop.
extension ViewController: UITextFieldDelegate {
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
// remove the textField from first responder
textField.resignFirstResponder()
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment