Added default behaviour for return key

This commit is contained in:
dankito 2020-07-29 14:15:20 +02:00
parent ebf4488e90
commit 5f97a21965
1 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,10 @@ struct UIKitTextField: UIViewRepresentable {
didHandleReturnKey = nextView?.becomeFirstResponder() ?? false didHandleReturnKey = nextView?.becomeFirstResponder() ?? false
} }
if didHandleReturnKey == false {
textField.resignFirstResponder() // default behaviour
}
return didHandleReturnKey return didHandleReturnKey
} }