Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextField return key text change from "Done" to "Post"

Tags:

iphone

I have created a sample application that has the textField and its return key type should be done. I want to change text from "Done" to "Post".

I really need do it.

Please help me ? Thanks in advance.

like image 442
raj Avatar asked Aug 08 '11 06:08

raj


2 Answers

now apple only support these type:

typedef enum {
   UIReturnKeyDefault,//Set the text of the return key to “return”.
   UIReturnKeyGo,//Set the text of the return key to “Go”.
   UIReturnKeyGoogle,//Set the text of the return key to “Google”.
   UIReturnKeyJoin,//Set the text of the return key to “Join”.
   UIReturnKeyNext,//Set the text of the return key to “Next”.
   UIReturnKeyRoute,//Set the text of the return key to “Route”.
   UIReturnKeySearch,//Set the text of the return key to “Search”.
   UIReturnKeySend,//Set the text of the return key to “Send”.
   UIReturnKeyYahoo,//Set the text of the return key to “Yahoo”.
   UIReturnKeyDone,//Set the text of the return key to “Done”.
   UIReturnKeyEmergencyCall,//Set the text of the return key to “Emergency Call”.
} UIReturnKeyType;

Maybe you can use send instead.

like image 83
Bonny Avatar answered Nov 14 '22 23:11

Bonny


You get the return key and keyboard types defined in the OS. Unless you want to try to hack the keyboard's view hierarchy to change that button, which would be a really bad plan. (Standard recommendation here is to file a bug report with Apple to let them know you'd like more/different options.

like image 44
Nitish Avatar answered Nov 14 '22 22:11

Nitish