iOS7使用iOS8上的方法报错处理
问题描述
我们经常会遇到在低版本上使用高版本方法导致的bug,例如:
WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: -[__NSCFString containsString:]:
unrecognized selector sent to instance 该方法就是在iOS8上的方法,在iOS7的设备上使用的时候就会导致该bug。
解决方法
使用低版本中的方法代替所使用的方法,或者使用可以兼容高低版本的方法。例如该bug可以使用- (NSRange)rangeOfString:(NSString *)searchString
h1, h2, h3, h4, h5, h6, p, blockquote { margin: 0; padding: 0 }
body { font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif; font-size: 13px; line-height: 18px; color: rgba(115, 115, 115, 1); background-color: rgba(255, 255, 255, 1); margin: 10px 13px }
table { margin: 10px 0 15px; border-collapse: collapse }
td, th { border: 1px solid rgba(221, 221, 221, 1); padding: 3px 10px }
th { padding: 5px 10px }
a { color: rgba(0, 105, 214, 1) }
a:hover { color: rgba(0, 80, 163, 1); text-decoration: none }
a img { border: none }
p { margin-bottom: 9px }
h1, h2, h3, h4, h5, h6 { color: rgba(64, 64, 64, 1); line-height: 36px }
h1 { margin-bottom: 18px; font-size: 30px }
h2 { font-size: 24px }
h3 { font-size: 18px }
h4 { font-size: 16px }
h5 { font-size: 14px }
h6 { font-size: 13px }
hr { margin: 0 0 19px; border-top: 0; border-right: 0; border-bottom: 1px solid rgba(204, 204, 204, 1); border-left: 0 }
blockquote { padding: 13px 13px 21px 15px; margin-bottom: 18px; font-family: georgia, serif; font-style: italic }
blockquote:before { content: "“"; font-size: 40px; margin-left: -10px; font-family: georgia, serif; color: rgba(238, 238, 238, 1) }
blockquote p { font-size: 14px; font-weight: 300; line-height: 18px; margin-bottom: 0; font-style: italic }
code, pre { font-family: Monaco, Andale Mono, Courier New, monospace }
code { background-color: rgba(254, 233, 204, 1); color: rgba(0, 0, 0, 0.75); padding: 1px 3px; font-size: 12px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px }
pre { display: block; padding: 14px; margin: 0 0 18px; line-height: 16px; font-size: 11px; border: 1px solid rgba(217, 217, 217, 1); white-space: pre-wrap; word-wrap: break-word }
pre code { background-color: rgba(255, 255, 255, 1); color: rgba(115, 115, 115, 1); font-size: 11px; padding: 0 }
sup { font-size: 0.83em; vertical-align: super; line-height: 0 }
* { -webkit-print-color-adjust: exact }
@media screen and (min-width: 914px) { body { width: 854px; margin: 10px auto } }
@media print { body, code, pre code, h1, h2, h3, h4, h5, h6 { color: rgba(0, 0, 0, 1) } table, pre { page-break-inside: avoid } }
iOS7使用iOS8上的方法报错处理的更多相关文章
- appium+python自动化64-使用Uiautomator2执行driver.keyevent()方法报错解决
前言 未加'automationName': 'Uiautomator2'参数使用Uiautomator可以正常使用driver.keyevent()方法,使用Uiautomator2时driver. ...
- 项目实体类使用@Data注解,但是项目业务类中使用getA(),setA()方法报错,eclipse中配置lombok
@Data注解来源与Lombok,可以减少代码中大量的set get方法,大量减少冗余代码,但是今天部署项目时候,发现实体类使用@Data注解,但是项目业务类中使用getA(),setA()方法报错. ...
- eclipse中运行 main 方法报错,找不到类
eclipse (maven 项目)中运行 main 方法报错,找不到类 ** 发现:在 eclipse中的 "Marker" 控制面板中 ,发现问题所在 只要删除 maven 仓 ...
- Android webview js 调用java方法报错"Uncaught TypeError: Object [object Object] has no method xx
webview开发,在Android4.4下js调用java方法报错"Uncaught TypeError: Object [object Object] has no method,同样的 ...
- moviepy AudioClip的max_volume方法报错ValueError: operands could not be broadcast together with shapes(2,)
☞ ░ 前往老猿Python博文目录 ░ 在<moviepy音视频剪辑:AudioClip的max_volume方法报TypeError: bad operand type for abs(): ...
- SpringBoot关于SpringDataJpa中findOne()方法报错问题
问题描述: 首先用的SpringDataJPA的1.11版本,可以使用findOne()方法根据id查询 然后我使用了2.0.5版本,发现findOne()方法报错了,不能用来当作根据id查询了. 当 ...
- JFinal上传文件时用getFile()方法报错
原因是缺少cos.jar包,补上即可.
- C# 项目迁移 Microsoft.VisualStudio.Tools.Office.BuildTasks 生成解决方法报错:请确认 <UsingTask> 声明正确,该程序集及其所有依赖项都可用
问题定位: 1.在Server2003上使用vs2010开发的项目,移到Win8上,同样使用vs2010打开.在生成解决方案的时候有如下报错: 未能从程序集 Microsoft.VisualStudi ...
- 使用seek()方法报错:“io.UnsupportedOperation: can't do nonzero cur-relative seeks”错误的原因
在使用seek()函数时,有时候会报错为 “io.UnsupportedOperation: can't do nonzero cur-relative seeks”,代码如下: >>& ...
随机推荐
- 动态规划专题一:线性dp
第一篇博客随笔,被迫写的bushi 上课讲的动态规划入门,还是得总结一下吧 背包 01背包 背包有容量限制,每一件物品只能够取一件(这就是为什么j从V至v[i]循环的原因) 思路:f数组表示当前状态的 ...
- 20201103_notepad++修改文件保存的默认格式
修改notepad++文件保存的默认格式 点开 设置 ==> 首选项 1. 修改默认语言为要默认保存的文件格式 2. 将默认目录下的使用新样式对话框取消勾选
- Django项目登录注册系统
Django项目之个人网站 关注公众号"轻松学编程"了解更多. Github地址:https://github.com/liangdongchang/MyWeb.git 感兴趣的可 ...
- python框架Django中MTV框架之VIew(业务控制器)
MTV框架之VIew(业务控制器) 关注公众号"轻松学编程"了解更多. 1.什么是视图 视图层=路由表(urls.py)+视图函数(views.py) 其角色相当于MVC中的Con ...
- [Luogu P2257] YY的GCD (莫比乌斯函数)
题面 传送门:洛咕 Solution 推到自闭,我好菜啊 显然,这题让我们求: \(\large \sum_{i=1}^{n}\sum_{j=1}^{m}[gcd(i,j)\in prime]\) 根 ...
- ThinkPHP中,运用PHPExcel,将数据库导出到Excel中
1.将PHPExcel插件放在项目中,本人位置是ThinkPHP文件夹下,目录结构如下/ThinkPHP/Library//Vendor/...2.直接根据模型,配置三个变量即可使用./** * Ex ...
- 从ReentrantLock加锁解锁角度分析AQS
本文用于记录在学习AQS时,以ReentrantLock为切入点,深入源码分析ReentrantLock的加锁和解锁过程. 同步器AQS的主要使用方式是继承,子类通过继承同步器并实现它的抽象方法来管理 ...
- php 导出excel 10万数据
php导出excel 10万数据(此代码主要测试用) 在工作当中要对一些基本信息和其他信息导出 起初信息比较小无所谓.... 但当信息超出65535的时候 发现点问题了 超出了 而且 反应速度很慢 实 ...
- ERP的主数据的操作与设计--开源软件诞生25
赤龙ERP主数据管理讲解--第25篇 用日志记录"开源软件"的诞生 [进入地址 点亮星星]----祈盼着一个鼓励 博主开源地址: 码云:https://gitee.com/redr ...
- Linux下Flask环境
一,安装python3.6.4 wget http://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz tar -xvzf Python-3.6.4. ...