문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top