we can set this property of UITextField to "Send", "Search", "Go", etc.:
@property(nonatomic) UIReturnKeyType returnKeyType
But setting it while using the UITextField doesn't change at all.
I want this behavior: When UITextField is empty, let returnKeyType be "Return", otherwise let returnKeyType be "Send".
Normally the returnKeyType
and other properties are checked when the keyboard is displayed, but are not monitored for later updates. Try calling reloadInputViews
on the text field after changing the returnKeyType
, that should instruct it to refresh the keyboard settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With