开发者

Changing the return key to a done key on the iPhone Keyboard (UITextView)

开发者 https://www.devze.com 2023-02-04 05:19 出处:网络
I\'m working on an app with a UITextView. I want to replace the return key on the keyboard with 开发者_JAVA技巧the Done key. I\'ve found code for it but then it\'s for a UITextField and not a UITextVi

I'm working on an app with a UITextView. I want to replace the return key on the keyboard with 开发者_JAVA技巧the Done key. I've found code for it but then it's for a UITextField and not a UITextView.


You can change the return key with the returnKeyType property

UITextView *textview = [[UITextView alloc] initWithFrame:CGRectMake(0.f, 0.f, 120.f, 40.f)];

textview.returnKeyType = UIReturnKeyDone;
[self.view addSubview:textview];

Regards,
KL94

0

精彩评论

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