I want change the 'return' key of iphone virtual key to a another name

后端 未结 1 578
一生所求
一生所求 2020-12-31 16:57

I want change the \'return\' key of iphone virtual key to a another name such as \'Go\'. Help me please.

相关标签:
1条回答
  • 2020-12-31 17:05

    There's a property

    @property(nonatomic) UIReturnKeyType returnKeyType;  
    

    defined in the UITextInputTraits protocol. So what you probably want to do is:

    UITextField *myTextField; // your textfield..
    myTextField.returnKeyType = UIReturnKeyGo;
    

    For other possible values see UIReturnKeyType:

    typedef enum {
        UIReturnKeyDefault,
        UIReturnKeyGo,
        UIReturnKeyGoogle,
        UIReturnKeyJoin,
        UIReturnKeyNext,
        UIReturnKeyRoute,
        UIReturnKeySearch,
        UIReturnKeySend,
        UIReturnKeyYahoo,
        UIReturnKeyDone,
        UIReturnKeyEmergencyCall,
    } UIReturnKeyType;
    
    0 讨论(0)
提交回复
热议问题