- ios加载html富文本编辑器,IOS - 富文本解决方案(上)
Mr.括号
ios加载html富文本编辑器
概述针对富文本来说,一直都是移动端的痛。虽然网上的解决方案很多,但是大多数都是基于展示,真正可以进行编辑的,却很少。而这些少数的实现中,适合我使用就没有了。所以我决定自己研究,并实现。需求需求说起来很简单,就是要设计一款IOS、Androd、PC端通用的富文本编辑器。模仿新浪微博中-头条文章。调研经过多次的分析和调研,有过这么几套方案。使用UIWebView来实现使用内嵌js编辑器实现使用html
- iOS Native与JS通信:JSBridge
ilycyq
iosjavascript开发语言cocoaobjective-cxcode前端
文章目录一、简介二、JS调用Native1.使用URLSchemea.UIWebViewb.WKWebView2.使用JavaScriptCore(iOS7+)3.使用WKWebView和WKScriptMessageHandler(iOS8+)三、Native调用JS1.使用UIWebView2.使用WKWebView3.使用JavaScriptCore(iOS7+)一、简介对于移动应用程序的开
- UIWebView的Cookie 管理
Rui哥
参考文章UIWebView的Cookie管理Cookie简介说到Cookie,或许有些小伙伴会比较陌生,有些小伙伴会比较熟悉。如果项目中,所有页面都是纯原生来实现的话,一般Cookie这个东西或许我们永远也不会接触到。但是,这里还是要说一下Cookie,因为它真的很重要,由它产生的一些坑也很多。Cookie在Web利用的最多的地方,是用来记录各种状态。比如你在Safari中打开百度,然后登陆自己的
- iOS 一个简单的基于WKWebView的进度导航
雪_晟
前言iOS8之后出现了WKWebView,占用内存少,通过WebKit可以和js交互。最重要是可以监测网页加载的进度,之前用UIWebView做的进度条都假象。代码WebKit中WebView交互被细化了,主要分为WKNavigationDelegate,WKUIDelegate,WKWebViewConfiguration。WKNavigationDelegate主要处理网页导航的一些协议。WK
- iOS 可用命令集
1、遍历工程是否包含xxx(例UIWebView)(用于ITMS-90809:DeprecatedAPIUsage)cd工程目录grep-RUIWebView2、pod命令>当需要在CocoaPods中删除一个我们不要的库时可以在Podfile中直接删除相关库>>再cd到项目目录执行podupdate--verbose--no-repo-update或者podinstall--verbose--n
- UIWebView加载HTML标签
倪大头
遵循UIWebViewDelegate协议,在代理方法里获取内容整体高度,调整webview的frameNSString*htmlStr="";UIWebView*webView=[[UIWebViewalloc]initWithFrame:CGRectMake(kScaleX*15,0,kScaleX*345,10)];webView.delegate=self;webView.userInte
- ios uiwebview视频页面 no compatable source was found for this media
playboy
Android和浏览器上能够正常显示的视频播放页面,在iOS的UIWebView上,显示nocompatablesourcewasfoundforthismedia经后端同事查询后,发现是虽然该页面是https协议的请求,但是在页面的代码中有http请求。因此导致iOS上访问异常,都改成https请求,就ok了。
- H5与iOS交互
NewChapter °
-(void)webViewDidFinishLoad:(UIWebView*)webView{//js方法名+参数NSString*jsCode=[NSStringstringWithFormat:@"report('%@')",self.jsStr];//调用html页面的js方法[webViewstringByEvaluatingJavaScriptFromString:jsCode];}资
- 使用真机调试首次加载UIWebView忽然报错
reviewThis
最近使用真机调试加载UIWebView的时候忽然报错,令人费解。报错如下:validateFunctionArguments:2819:failedassertion`MTLPixelFormatoftexture[(MTLPixelFormatRGBA16Unorm)]boundatindex0isincompatiblewithtextureparameter[MTLDataTypeHalft
- ios 禁止UIWebView上下滑动的效果
aewmc268204
移动开发
具体代码的实现:for(idsubviewinwebview.subviews){if([[subviewclass]isSubclassOfClass:[UIScrollViewclass]]){((UIScrollView*)subview).bounces=NO;}//AfteriOS5webview.scrollView.bounces=NO;}转载于:https://www.cnblog
- ITMS-90809: Deprecated API Usage UIWebView
malgee
ITMS-90809:DeprecatedAPIUsage-NewappsthatuseUIWebViewarenolongeraccepted.Instead,useWKWebViewforimprovedsecurityandreliability.Learnmore(https://developer.apple.com/documentation/uikit/uiwebview).全局搜索
- 关于Cordova的CDVViewController加载web页面放大缩小
柠檬檬檬檬檬不萌
UIwebView缩放首先就是需要让webView去设置下可以支持缩放[__webViewsetScalesPageToFit:YES];如果网页支持缩放只需要上面的一句就可以了。你可以加在谷歌的试一下,但是你要加在百度就就不行了,因为百度没有在网页支持缩放,这个时候就需要下面一段代码了,在webView加载完之后去添加一段代码。(以上说的都是在safari浏览器里面)。-(void)webVie
- 开发手札:记录跟踪ios上架问题
羊羊2035
开发手札
事情是这样的,业余时间开发了几个app(三个游戏一个软件),因为apple政策收紧的原因,游戏是不考虑上架了,除非我做一个不错的先在steam得到好评再说,所以只考虑上架那个图形工具app,上架流程就和以前上架一样,xcodebuildarchive签名后uploadtoapplestoreconnect。这里unity+xcode又出了个幺蛾子,那就是uiwebview的问题,在ios13之后u
- iOS去除WebViewJavascriptBridge.h和WebViewJavascriptBridge.m
aggie1024
转自:https://www.jianshu.com/p/a137a85b5872ios13苹果对UIWebView不再支持;请采用WKWebViewUIKIT_EXTERNAPI_DEPRECATED("Nolongersupported;pleaseadoptWKWebView.",ios(2.0,12.0))API_UNAVAILABLE(tvos,macos)@interfaceUIWeb
- 第三方库 IQKeyboardManager使用之整理
weixin_33716941
IQKeyboardManager是iOS中解决键盘弹起遮挡UITextField/UITextView的一种很实用的工具。之前我一直是添加手势去收起键盘或者令视图退出编辑状态,现在使用这个则无需输入任何代码,不需要额外的设置。这个库默认支持UITextField、UITextView、UIWebView、UIScrollView、UITableView、UICollectionView.使用IQ
- 搜索项目内容
伏伏
grep-rXX.cd到文件夹里可以去搜索内容记得加后面那个.今天看到文章,苹果审核后面UIWebView不在过审,所以要全部替换。但是有些第三方的sdk,在项目里搜索是搜不到的,所以要用这个。
- uiwebview内嵌视频无法播放
前尘梦醒
UIWebView播放video标签的视频时,有时候加载很慢,有时候需要点击两次才播放,由于苹果的安全策略问题,禁用了JavaScript中video的autoplay。所以通过javascript调用video.play()的时候,如果不是在onclick或者ontouch事件中调用的video.play(),那么播放将无效。解决办法:webView.mediaPlaybackRequiresU
- UIWebView 适应屏幕
瘦柳山人
1.由于webView是UIscrollview的子类可以使用scrollview的zoom属性-(void)webViewDidFinishLoad:(UIWebView*)theWebView{CGSizecontentSize=theWebView.scrollView.contentSize;CGSizeviewSize=self.view.bounds.size;floatrw=view
- WKWebView获取UA以及更改UA的坑
地上的
最近有webView的相关需求,需要更改UA来适应我们的前端,但是又得保留原本的UA,所以不能直接覆盖,得追加字段,这个过程中WKWebView坑就比较多,列数一下。UIWebView更改UAUIWebView*webview=[[UIWebViewalloc]initWithFrame:CGRectZero];NSString*ua=[webviewstringByEvaluatingJavaS
- iOS 文件预览的四种方法
6ffd6634d577
前言开发中可能会遇到文件操作的需求,其中包括PDF文档的预览、图片、doc文档转换成PDF文档、第三方应用导入文件置自己应用中、PDF文档的批注与修改。这篇文章我会先记录预览本地或网络的文件(word、Excel、pdf、txt)等。文档预览的几种方式UIWebView/WKWebViewQLPreviewControllerUIDocumentInteractionControllerCGCon
- GRMustache
一代骄马
我们将html文件读取到内存中,在使用GRMustache的方法生成渲染后的HTML内容,就可以通过UIWebview加载HTML内容了
- React-native 项目升级Xcode 11全记录
louyong0571
RNxcode
React-native项目升级Xcode11全记录react-native版本$react-native--versionreact-native-cli:2.0.1react-native:0.57.7版本比较早的项目,最近提交Appstore出现warning1.升级iossdk到132.包含UIWebview不改掉的话4月以后可能就会被拒了。没办法,作为一个android出身的转行RN的苦
- iOS-WKWebView 解读备注
MR_詹
原文一、WKWebView简介UIWebView自iOS2就有,WKWebView从iOS8才有,毫无疑问WKWebView将逐步取代笨重的UIWebView。通过简单的测试即可发现UIWebView占用过多内存,且内存峰值更是夸张。WKWebView网页加载速度也有提升,但是并不像内存那样提升那么多。下面列举一些其它的优势:1、更多的支持HTML5的特性2、官方宣称的高达60fps的滚动刷新率以
- UIWebView动态展示gif gif图不适应控件大小
精神薇
CGRectframe=CGRectMake(0,[[UIApplicationsharedApplication]statusBarFrame].size.height+44,350,350);//view生成UIWebView*webView=[[UIWebViewalloc]initWithFrame:frame];webView.backgroundColor=[UIColorredCol
- 检查项目中是否包含UIWebView
Kdq
最近公司要创建一个新的APP,提交APPStore审核,提交审核的时候苹果提示如下DearDeveloper,Weidentifiedoneormoreissueswitharecentdeliveryforyourapp,"xxxxPleasecorrectthefollowingissues,thenuploadagain.ITMS-90809:DeprecatedAPIUsage-Newap
- UIWebView更换WKWebView
Hyman_luo
一、加载方式1.-(void)loadRequest:(NSURLRequest*)request;可以请求本地文件也可以请求网络资源NSURL*fileURL=[[NSBundlemainBundle]URLForResource:@"test.html"withExtension:nil];//fileURL=[NSURLURLWithString:@"https://www.baidu.co
- iOS UILabel复制粘贴效果
BeTheBestOne
个人总结iOS技术ios控件复制粘贴自定义菜单项
在iOS中下面三个控件,自身就有复制-粘贴的功能:1、UITextView2、UITextField3、UIWebViewUIKitframework提供了几个类和协议方便我们在自己的应用程序中实现剪贴板的功能。1、UIPasteboard:我们可以向其中写入数据,也可以读取数据。UIPasteboard类提供了粘贴板的接口。粘贴板是用于在一个应用程序内或不同应用程序间进行数据共享的受保护区域。该
- CordVoa下WKWebView的UserAgent问题
kakao6
1.重构项目背景cordVoaWKWebView替换UIWebView沟通的重要性1.历时8天的解决bug的坑逼日程1.接到一个任务,说在WKWebView替换UIwebview过程中,decidePolicyForNavigationAction拦截url时,URL有些内容会丢失。比如abs:XX//a=1&b=2,正常情况是abs是可以拦截到的,但是WK加载相同的界面,abs有时侯会加载出来,
- App Store Connect 上构建的新版本上传后找不到,二进制文件无效
时光不染
#iOSUnityiosxcodeappstore
上传了新版本,收到信息二进制文件无效。但是在AppStoreConnect看不到,并且未收到提示邮件。这是我收到的仅有的提示信息二进制文件无效可能的原因:一.项目中使用了系统某些权限(相机,相册,麦克风等),但是在info.plist中没有添加二.使用私有API或IDFA三.scheme设置四.app图标修改相关五.UIWebView等废弃API一.项目中使用了系统某些权限(相机,相册,麦克风等)
- 从UIWebView到WKWebView替换历程(关于Js复杂交互)(二)
LiuffSunny
如果项目中没有与复杂的Js交互,那么就不用经历下面这个相对复杂的探索过程了.之前用webView与js交互-(void)webViewDidFinishLoad:(UIWebView*)webView{//设置javaScriptContext上下文self.jsContext=[webViewvalueForKeyPath:@"documentView.webView.mainFrame.jav
- Java 并发包之线程池和原子计数
lijingyao8206
Java计数ThreadPool并发包java线程池
对于大数据量关联的业务处理逻辑,比较直接的想法就是用JDK提供的并发包去解决多线程情况下的业务数据处理。线程池可以提供很好的管理线程的方式,并且可以提高线程利用率,并发包中的原子计数在多线程的情况下可以让我们避免去写一些同步代码。
这里就先把jdk并发包中的线程池处理器ThreadPoolExecutor 以原子计数类AomicInteger 和倒数计时锁C
- java编程思想 抽象类和接口
百合不是茶
java抽象类接口
接口c++对接口和内部类只有简介的支持,但在java中有队这些类的直接支持
1 ,抽象类 : 如果一个类包含一个或多个抽象方法,该类必须限定为抽象类(否者编译器报错)
抽象方法 : 在方法中仅有声明而没有方法体
package com.wj.Interface;
- [房地产与大数据]房地产数据挖掘系统
comsci
数据挖掘
随着一个关键核心技术的突破,我们已经是独立自主的开发某些先进模块,但是要完全实现,还需要一定的时间...
所以,除了代码工作以外,我们还需要关心一下非技术领域的事件..比如说房地产
&nb
- 数组队列总结
沐刃青蛟
数组队列
数组队列是一种大小可以改变,类型没有定死的类似数组的工具。不过与数组相比,它更具有灵活性。因为它不但不用担心越界问题,而且因为泛型(类似c++中模板的东西)的存在而支持各种类型。
以下是数组队列的功能实现代码:
import List.Student;
public class
- Oracle存储过程无法编译的解决方法
IT独行者
oracle存储过程
今天同事修改Oracle存储过程又导致2个过程无法被编译,流程规范上的东西,Dave 这里不多说,看看怎么解决问题。
1. 查看无效对象
XEZF@xezf(qs-xezf-db1)> select object_name,object_type,status from all_objects where status='IN
- 重装系统之后oracle恢复
文强chu
oracle
前几天正在使用电脑,没有暂停oracle的各种服务。
突然win8.1系统奔溃,无法修复,开机时系统 提示正在搜集错误信息,然后再开机,再提示的无限循环中。
无耐我拿出系统u盘 准备重装系统,没想到竟然无法从u盘引导成功。
晚上到外面早了一家修电脑店,让人家给装了个系统,并且那哥们在我没反应过来的时候,
直接把我的c盘给格式化了 并且清理了注册表,再装系统。
然后的结果就是我的oracl
- python学习二( 一些基础语法)
小桔子
pthon基础语法
紧接着把!昨天没看继续看django 官方教程,学了下python的基本语法 与c类语言还是有些小差别:
1.ptyhon的源文件以UTF-8编码格式
2.
/ 除 结果浮点型
// 除 结果整形
% 除 取余数
* 乘
** 乘方 eg 5**2 结果是5的2次方25
_&
- svn 常用命令
aichenglong
SVN版本回退
1 svn回退版本
1)在window中选择log,根据想要回退的内容,选择revert this version或revert chanages from this version
两者的区别:
revert this version:表示回退到当前版本(该版本后的版本全部作废)
revert chanages from this versio
- 某小公司面试归来
alafqq
面试
先填单子,还要写笔试题,我以时间为急,拒绝了它。。时间宝贵。
老拿这些对付毕业生的东东来吓唬我。。
面试官很刁难,问了几个问题,记录下;
1,包的范围。。。public,private,protect. --悲剧了
2,hashcode方法和equals方法的区别。谁覆盖谁.结果,他说我说反了。
3,最恶心的一道题,抽象类继承抽象类吗?(察,一般它都是被继承的啊)
4,stru
- 动态数组的存储速度比较 集合框架
百合不是茶
集合框架
集合框架:
自定义数据结构(增删改查等)
package 数组;
/**
* 创建动态数组
* @author 百合
*
*/
public class ArrayDemo{
//定义一个数组来存放数据
String[] src = new String[0];
/**
* 增加元素加入容器
* @param s要加入容器
- 用JS实现一个JS对象,对象里有两个属性一个方法
bijian1013
js对象
<html>
<head>
</head>
<body>
用js代码实现一个js对象,对象里有两个属性,一个方法
</body>
<script>
var obj={a:'1234567',b:'bbbbbbbbbb',c:function(x){
- 探索JUnit4扩展:使用Rule
bijian1013
java单元测试JUnitRule
在上一篇文章中,讨论了使用Runner扩展JUnit4的方式,即直接修改Test Runner的实现(BlockJUnit4ClassRunner)。但这种方法显然不便于灵活地添加或删除扩展功能。下面将使用JUnit4.7才开始引入的扩展方式——Rule来实现相同的扩展功能。
1. Rule
&n
- [Gson一]非泛型POJO对象的反序列化
bit1129
POJO
当要将JSON数据串反序列化自身为非泛型的POJO时,使用Gson.fromJson(String, Class)方法。自身为非泛型的POJO的包括两种:
1. POJO对象不包含任何泛型的字段
2. POJO对象包含泛型字段,例如泛型集合或者泛型类
Data类 a.不是泛型类, b.Data中的集合List和Map都是泛型的 c.Data中不包含其它的POJO
 
- 【Kakfa五】Kafka Producer和Consumer基本使用
bit1129
kafka
0.Kafka服务器的配置
一个Broker,
一个Topic
Topic中只有一个Partition() 1. Producer:
package kafka.examples.producers;
import kafka.producer.KeyedMessage;
import kafka.javaapi.producer.Producer;
impor
- lsyncd实时同步搭建指南——取代rsync+inotify
ronin47
1. 几大实时同步工具比较 1.1 inotify + rsync
最近一直在寻求生产服务服务器上的同步替代方案,原先使用的是 inotify + rsync,但随着文件数量的增大到100W+,目录下的文件列表就达20M,在网络状况不佳或者限速的情况下,变更的文件可能10来个才几M,却因此要发送的文件列表就达20M,严重减低的带宽的使用效率以及同步效率;更为要紧的是,加入inotify
- java-9. 判断整数序列是不是二元查找树的后序遍历结果
bylijinnan
java
public class IsBinTreePostTraverse{
static boolean isBSTPostOrder(int[] a){
if(a==null){
return false;
}
/*1.只有一个结点时,肯定是查找树
*2.只有两个结点时,肯定是查找树。例如{5,6}对应的BST是 6 {6,5}对应的BST是
- MySQL的sum函数返回的类型
bylijinnan
javaspringsqlmysqljdbc
今天项目切换数据库时,出错
访问数据库的代码大概是这样:
String sql = "select sum(number) as sumNumberOfOneDay from tableName";
List<Map> rows = getJdbcTemplate().queryForList(sql);
for (Map row : rows
- java设计模式之单例模式
chicony
java设计模式
在阎宏博士的《JAVA与模式》一书中开头是这样描述单例模式的:
作为对象的创建模式,单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。这个类称为单例类。 单例模式的结构
单例模式的特点:
单例类只能有一个实例。
单例类必须自己创建自己的唯一实例。
单例类必须给所有其他对象提供这一实例。
饿汉式单例类
publ
- javascript取当月最后一天
ctrain
JavaScript
<!--javascript取当月最后一天-->
<script language=javascript>
var current = new Date();
var year = current.getYear();
var month = current.getMonth();
showMonthLastDay(year, mont
- linux tune2fs命令详解
daizj
linuxtune2fs查看系统文件块信息
一.简介:
tune2fs是调整和查看ext2/ext3文件系统的文件系统参数,Windows下面如果出现意外断电死机情况,下次开机一般都会出现系统自检。Linux系统下面也有文件系统自检,而且是可以通过tune2fs命令,自行定义自检周期及方式。
二.用法:
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g grou
- 做有中国特色的程序员
dcj3sjt126com
程序员
从出版业说起 网络作品排到靠前的,都不会太难看,一般人不爱看某部作品也是因为不喜欢这个类型,而此人也不会全不喜欢这些网络作品。究其原因,是因为网络作品都是让人先白看的,看的好了才出了头。而纸质作品就不一定了,排行榜靠前的,有好作品,也有垃圾。 许多大牛都是写了博客,后来出了书。这些书也都不次,可能有人让为不好,是因为技术书不像小说,小说在读故事,技术书是在学知识或温习知识,有
- Android:TextView属性大全
dcj3sjt126com
textview
android:autoLink 设置是否当文本为URL链接/email/电话号码/map时,文本显示为可点击的链接。可选值(none/web/email/phone/map/all) android:autoText 如果设置,将自动执行输入值的拼写纠正。此处无效果,在显示输入法并输
- tomcat虚拟目录安装及其配置
eksliang
tomcat配置说明tomca部署web应用tomcat虚拟目录安装
转载请出自出处:http://eksliang.iteye.com/blog/2097184
1.-------------------------------------------tomcat 目录结构
config:存放tomcat的配置文件
temp :存放tomcat跑起来后存放临时文件用的
work : 当第一次访问应用中的jsp
- 浅谈:APP有哪些常被黑客利用的安全漏洞
gg163
APP
首先,说到APP的安全漏洞,身为程序猿的大家应该不陌生;如果抛开安卓自身开源的问题的话,其主要产生的原因就是开发过程中疏忽或者代码不严谨引起的。但这些责任也不能怪在程序猿头上,有时会因为BOSS时间催得紧等很多可观原因。由国内移动应用安全检测团队爱内测(ineice.com)的CTO给我们浅谈关于Android 系统的开源设计以及生态环境。
1. 应用反编译漏洞:APK 包非常容易被反编译成可读
- C#根据网址生成静态页面
hvt
Web.netC#asp.nethovertree
HoverTree开源项目中HoverTreeWeb.HVTPanel的Index.aspx文件是后台管理的首页。包含生成留言板首页,以及显示用户名,退出等功能。根据网址生成页面的方法:
bool CreateHtmlFile(string url, string path)
{
//http://keleyi.com/a/bjae/3d10wfax.htm
stri
- SVG 教程 (一)
天梯梦
svg
SVG 简介
SVG 是使用 XML 来描述二维图形和绘图程序的语言。 学习之前应具备的基础知识:
继续学习之前,你应该对以下内容有基本的了解:
HTML
XML 基础
如果希望首先学习这些内容,请在本站的首页选择相应的教程。 什么是SVG?
SVG 指可伸缩矢量图形 (Scalable Vector Graphics)
SVG 用来定义用于网络的基于矢量
- 一个简单的java栈
luyulong
java数据结构栈
public class MyStack {
private long[] arr;
private int top;
public MyStack() {
arr = new long[10];
top = -1;
}
public MyStack(int maxsize) {
arr = new long[maxsize];
top
- 基础数据结构和算法八:Binary search
sunwinner
AlgorithmBinary search
Binary search needs an ordered array so that it can use array indexing to dramatically reduce the number of compares required for each search, using the classic and venerable binary search algori
- 12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
刘星宇
c面试
12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
1.gets()函数
问:请找出下面代码里的问题:
#include<stdio.h>
int main(void)
{
char buff[10];
memset(buff,0,sizeof(buff));
- ITeye 7月技术图书有奖试读获奖名单公布
ITeye管理员
活动ITeye试读
ITeye携手人民邮电出版社图灵教育共同举办的7月技术图书有奖试读活动已圆满结束,非常感谢广大用户对本次活动的关注与参与。
7月试读活动回顾:
http://webmaster.iteye.com/blog/2092746
本次技术图书试读活动的优秀奖获奖名单及相应作品如下(优秀文章有很多,但名额有限,没获奖并不代表不优秀):
《Java性能优化权威指南》