Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 669
inFever Avatar asked Jan 15 '11 22:01

inFever


1 Answers

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

like image 145
klefevre Avatar answered Nov 05 '22 23:11

klefevre