码迷,mamicode.com
首页 > 其他好文 > 详细

UITextField Delegate

时间:2016-04-11 20:25:44      阅读:115      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!