Iphone: uitextview setting done button
I use a UITextView in my application. The text editing is ok. I set the return button to Done. When I finish the editing, I l开发者_C百科ike to hide the keyboard with the done button. My Question: How can I set the done button?
Thanks, Balu.
Set your controller as the textField's Delegate, implement UITextField Delegate method textFieldShouldReturn in your controller and resign first responder before returning TRUE/YES:
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}
精彩评论