首页 > 其他 > 详细

UITextField Delegate

时间:2016-04-11 20:25:07      阅读:201      评论:0      收藏:0      [点我收藏+]

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField;        // return NO to disallow editing.  返回NO 文本框不可编辑

- (void)textFieldDidBeginEditing:(UITextField *)textField;           // became first responder    当前文本框变为第一响应者的时候触发这个事件

- (BOOL)textFieldShouldEndEditing:(UITextField *)textField;          // return YES to allow editing to stop and to resign first responder status. NO to disallow the editing session to end

- (void)textFieldDidEndEditing:(UITextField *)textField;             // may be called if forced even if shouldEndEditing returns NO (e.g. view removed from window) or endEditing:YES called

 

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string;   // return NO to not change text

 

- (BOOL)textFieldShouldClear:(UITextField *)textField;               // called when clear button pressed. return NO to ignore (no notifications)

- (BOOL)textFieldShouldReturn:(UITextField *)textField;              // called when ‘return‘ key pressed. return NO to ignore.  文本框点击键盘的上得return 键时调用。

UITextField Delegate

原文:http://www.cnblogs.com/fantasy3588/p/5379810.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!