Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextField keyboard return button title

I wanted to change the name of the return button key as I'm not developing the app in English. I'm having an UIAlertController and added a textField (.addTextFieldWithConfigurationHandler { (textField) -> Void in <someCode> }). How can I now change the title of the return button key in Swift? Actually there shouldn't be any difference to a normal UITextField. Thank for any help :]

like image 449
borchero Avatar asked Sep 29 '22 04:09

borchero


1 Answers

You cannot set custom text for the return key on iOS. There are a number of options but those are the only ones.

If you are only worried about translation, the keys will be translated automatically depending on the language that is configured on the users device. Otherwise, you are going to have to create an entirely custom keyboard (which is almost certainly not worth the effort).

like image 58
drewag Avatar answered Nov 15 '22 08:11

drewag