当前位置:K88软件开发文章中心编程语言APP编程CrossApp → 文章内容

CATextFieldDelegate

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-23 13:52:14

由 ?﹏???ζ???﹏﹏? 创建, 最后一次修改 2016-09-07 类说明CATextField的数据代理CATextFieldDelegate 方法(点击查看方法介绍)方法说明textFieldShouldBeginEditing开始编辑时触发textFieldShouldEndEditing结束编辑时触发textFieldShouldReturn返回时触发keyBoardHeight键盘高度textFieldShouldChangeCharacters文字更改后触发CATextFieldDelegate 方法说明virtual bool textFieldShouldBeginEditing(CATextField * sender)返回值:bool参数:类型参数名说明CATextField*sender当前textField解释:开始编辑时触发virtual bool textFieldShouldEndEditing(CATextField * sender)返回值:bool参数:类型参数名说明CATextField*sender当前textField解释:结束编辑时触发(如果发件人不想从时间中分离,返回true)virtual void textFieldShouldReturn(CATextField *sender){}返回值:void参数:类型参数名说明CATextField*sender当前textField解释:返回时触发virtual void keyBoardHeight(CATextField *sender, int height){}返回值:void参数:类型参数名说明CATextField*sender当前textFieldintheight高度解释:键盘高度virtual bool textFieldShouldChangeCharacters(CATextField* sender, unsigned int location, unsigned int lenght, const std::string& changedText);返回值:bool参数:类型参数名说明CATextField*sender当前textFieldunsigned int location光标选中的字符串,即被替换的字符串unsigned intlenghtlength为0时,表示删除const std::string&changedText更改文本时Text内容解释:textField文字更改后触发(返回true表示修改生效,返回false表示不做修改,textField的内容不变)

CATextFieldDelegate