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”,代码如下: >>& ...
随机推荐
- 模型评价指标:AUC
参考链接:https://www.iteye.com/blog/lps-683-2387643 问题: AUC是什么 AUC能拿来干什么 AUC如何求解(深入理解AUC) AUC是什么 混淆矩阵(Co ...
- 2020年Android开发最新整理阿里巴巴、字节跳动、小米面经,你不看看吗?
前言 2020年是转折的一年,上半年疫情原因,很多学android开发的小伙伴失业了,虽找到了一份工作,但高不成低不就,下半年金九银十有想法更换一份工作,很多需要大厂面试经验和大厂面试真题的小伙伴,想 ...
- ORB-SLAM3 Initializer.cpp函数解读
作者: Liam 点击上方"计算机视觉工坊",选择"星标" 干货第一时间送达 构造函数 Initializer::Initializer(const Frame ...
- 专题二:redis的数据类型之string
一.redis的数据存储格式 redis本身是一个Map,其中所有的数据都是采用 "key:value"的方式进行存储的. 我们说的数据类型是数据存储的类型,也就是对应下图的val ...
- EBAZ4205学习资源整理
EBAZ4205是一块矿机的控制板,芯片是ZYNQ7010,某鱼上应该不超过30元就能买一块,垃圾佬狂喜 经过不复杂的操作就能进行正常开发,由于货量比较大现在已经有很多大佬写了很多很多好的资料,这里我 ...
- Java导出Pdf格式表单
前言 作为开发人员,工作中难免会遇到复杂表单的导出,接下来介绍一种通过Java利用模板便捷导出Pdf表单的方式 模拟需求 需求:按照下面格式导出pdf格式的学生成绩单 准备工作 Excel软件 ...
- Java入门(5)
阅读书目:Java入门经典(第7版) 作者:罗格斯·卡登海德 protected变量只能在其所在的类,该类的子类,以及同一个包里的其他类中使用.包是一组用于完成相同目标的相关类. private变量只 ...
- Codeforces 1404 D. Game of Pairs
Codeforces 1404 D.Game of Pairs 给定\(2n\)个数\(1,2,...,2n\),A 和 B 将进行交互,规则如下: A 需要将元素分成 n 组 \(\mathbf{p ...
- php 批量脚本检测语法错误
shell 根据参数检测 当前php项目下 的语法错误 #!/bin/bash function getdir(){ for el in `ls $1` do dir_file=$1"/&q ...
- slam-g2o安装失败的解决问题
1.安装依赖项libqglviewer-dev出问题 原因: ubuntu16.04或者14.04不能直接sudo apt-get install libqglviewer-dev. 使用三个包来安装 ...