uiwebview 禁止数字链接问题(UIDataDetectorTypeNone)
2014-02-19 10:28
537 查看
今天帮助同事解决了一个bug ,问题是webview 传过来的数字会有链接,后来查询后,
可以用UIDataDetectorTypeNone 来禁止检测 数字链接问题
m_webView.dataDetectorTypes =
UIDataDetectorTypeNone;
下面是来自网络博客对这个函数的说明
在程序中检测数字和链接
在iPhone 3.0后就支持UIDataDetectorTypes来检测数字和链接。
UIDataDetectorTypePhoneNumber
UIDataDetectorTypeLink
UIDataDetectorTypeNone
UIDataDetectorTypeAll
通过设置dataDetectorTypes属性就可以实现功能
- (void)viewDidLoad {
- self.textView.dataDetectorTypes = UIDataDetectorTypeAll;
- }
同时你也可以通过Interface Builder来设置属性。
参考:
https://developer.apple.com/devcenter/ios/index.action
转自:http://blog.csdn.net/arthurchenjs/article/details/7336280
可以用UIDataDetectorTypeNone 来禁止检测 数字链接问题
m_webView.dataDetectorTypes =
UIDataDetectorTypeNone;
下面是来自网络博客对这个函数的说明
在iOS程序中检测数字和链接[转]
在程序中检测数字和链接在iPhone 3.0后就支持UIDataDetectorTypes来检测数字和链接。
UIDataDetectorTypePhoneNumber
UIDataDetectorTypeLink
UIDataDetectorTypeNone
UIDataDetectorTypeAll
通过设置dataDetectorTypes属性就可以实现功能
- (void)viewDidLoad {
- self.textView.dataDetectorTypes = UIDataDetectorTypeAll;
- }
同时你也可以通过Interface Builder来设置属性。
参考:
https://developer.apple.com/devcenter/ios/index.action
转自:http://blog.csdn.net/arthurchenjs/article/details/7336280
相关文章推荐
- Spring Boot启动问题:Cannot determine embedded database driver class for database type NONE
- SpringBoot常见问题(一)--启动报错(Cannot determine embedded database driver class for database type NONE)
- 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE
- 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE(转)
- 解决spring-boot启动中碰到的问题:Cannot determine embedded database driver class for database type NONE
- 用NSURLCache解决UIWebView请求远程资源慢的问题
- fckEditor漏洞修复,彻底禁用fckEditor的上传功能(含防止Type漏洞问题)
- _BLOCK_TYPE_IS_VALID(pHead->nBlockUse问题解析
- UIWebView 设定cookie的问题
- 当mapper中的parametType为基本类型(如int,string等)时,报错的问题(mybatis使用了<if>判断)
- iOS:UIWebView scrollView 的分页滑动问题
- 解决nagios插件报错:Validate.xs: In function 'get_type'的问题
- iOS实战演练之UIWebView无法显示问题
- java.lang.reflect.MalformedParameterizedTypeException异常问题
- 关于dubbo创建服务和引用服务时,会报错:cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 问题的解决
- Dubbo : cvc-complex-type.2.4.c 问题解决
- Mybatis配置有关问题-怎么动态设置resultType
- JPA 中的在一个类中 不能够使用多个fetch=FetchType.EAGER 否则会出问题
- 关于“JSONObject cannot be resolved to a type”问题的解决
- iOS问题笔记-[[NSBundle mainBundle] pathForResource: ofType:]方法获取不到资源路径