开发者

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;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜