79.shouldInteractWithTextAttachment各个代理方法解释 UITextView
来源:互联网 发布:网络规划师不承认高工 编辑:程序博客网 时间:2024/05/18 00:27
UITextView事件怎么处理?——可以使用委托对象处理
UITextView没有继承 UIControl 类——所以不支持绑定 IBAction 事件处理方法。
使用委托对象这种方法处理UITextView事件,UITextView必须实现UITextViewDelegate 协议。该协议中定义了如下方法:
1. - (BOOL)textViewShouldBeginEditing:(UITextView *)textView;
——将要开始编辑该UITextView内容的时候自动激发该方法;
2. - (BOOL)textViewShouldEndEditing:(UITextView *)textView;
——将要结束编辑该UITextView内容的时候自动激发该方法;
3. - (void)textViewDidBeginEditing:(UITextView *)textView;
——开始编辑时激发该方法;
4. - (void)textViewDidEndEditing:(UITextView *)textView;
——结束编辑时激发该方法;
5. - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
该UITextView内指定范围内的文本内容将要被替换时激发该方法;
6. - (void)textViewDidChange:(UITextView *)textView;
UITextView包含的文本内容改变时激发该方法;
7. - (void)textViewDidChangeSelection:(UITextView *)textView;
选中该UITextView控件中某些文本时会激发该方法;
8.- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange NS_AVAILABLE_IOS(7_0);
textView指定范围的内容与 URL 将要相互作用时激发该方法——该方法随着 IOS7被使用;
9.- (BOOL)textView:(UITextView *)textView shouldInteractWithTextAttachment:(NSTextAttachment *)textAttachment inRange:(NSRange)characterRange NS_AVAILABLE_IOS(7_0);
textView指定范围的内容与文本附件将要相互作用时,自动激发该方法——该方法随着 IOS7被使用;
- 79.shouldInteractWithTextAttachment各个代理方法解释 UITextView
- UITextView的基本用法和代理方法
- UITableView代理方法解释
- TableView 代理方法详细解释
- Liunx 各个挂载点解释
- 各个信号的解释
- http补充 各个解释
- 各个寄存器解释
- c 各个阶段解释
- UITextView 取消键盘方法
- UITextView的常用方法
- UITextView的常用方法
- ssh 代理详细解释(最简单的方法搭建代理服务器)
- android中的数据存取SQLite----对各个方法及方法参数的解释(整合)
- tkprof各个字段的解释
- UITextView 实现placeholder的方法
- UITextView 实现placeholder的方法
- UITextView 实现placeholder的方法
- 用Module中的事件验证是否登陆
- 第一章 在Centos7.1上安装oracle11gR2-静默安装
- 反射部分案例总结
- android SQL 查询操作语句大全
- mac或linux中打开.bashrc,编辑完之后如何保存退出
- 79.shouldInteractWithTextAttachment各个代理方法解释 UITextView
- HDU 1068 Girls and Boys 二分图
- Tomcat 8.0的安装及配置
- JAVA只截取字符串中的数字
- 【LEETCODE】228-Summary Ranges
- Android: 实现表情输入键盘的另外一种思路
- oracle中方案的概念以及方案与数据库的关系
- vim常用命令
- mediafilesegmenter 分段视频