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

CATextViewDelegate

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

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

CATextViewDelegate