开发者

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

开发者 https://www.devze.com 2022-12-31 22:26 出处:网络
I want change the\'r开发者_JAVA百科eturn\' key of iphone virtualkey to a another name such as \'Go\'. Help me please.There\'s a property

I want change the 'r开发者_JAVA百科eturn' key of iphone virtual key to a another name such as 'Go'. Help me please.


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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号