WKWebView是否被设计为UIWebView的替代品? [英] Is WKWebView designed as a replacement of UIWebView?

查看:203
本文介绍了WKWebView是否被设计为UIWebView的替代品?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提出这个问题,因为我不确定为什么Apple在不弃用UIWebView的情况下引入了WKWebView。重要的是要有一个想法,因为我正在编写一个大型代码库,需要做出基于知情/事实的决定。

Asking this questions as I am not sure why Apple introduced WKWebView without deprecating UIWebView. It is important to have an idea as I am programming a large code base and need to make an informed / fact based decision.


  • 我们可能不得不期望两个类在未来共存并且没有一个被弃用吗?

  • Are there any reason for which we may have to expect both classes to co-exist in the future and none get deprecated?

WKWebView纯粹是为速度而设计的性能(使用JIT)并且可能仅用于某些用例?

Is WKWebView purely designed for speed performance (using JIT) and will likely to serve only for certain use cases?

WKWebView的当前限制:

Current limitations of WKWebView:

https://mail.mozilla.org/pipermail/mobile-firefox- dev / 2014-December / 000993.html

如何使用WKWebView检索文件?

推荐答案

有几个原因,包括安全性(进程外模型),性能和内存管理。 Apple是否会弃用 UIWebView 并不是任何人都可以回答的问题,但Apple考虑到目前存在的许多限制(在WebKit2源代码库中部分解决了未来的iOS WK2框架包含) ,我有根据的猜测是, UIWebView 可以满足不同的需求。考虑到WebKitLegacy和WebKit2(现在改名为WebKit)框架引用相同的实现框架(WebCore,JSCore等),保持 UIWebView 不需要很多工作。活着。

There are several reasons, including security (out of process model), performance and memory management. Whether Apple would deprecate UIWebView is not something anyone can answer but Apple, however considering the many limitations there currently are (some partially solved in WebKit2 source repository for future iOS WK2 framework inclusion), my educated guess would be that UIWebView is here to stay for different needs. And considering both WebKitLegacy and WebKit2 (now renamed WebKit) frameworks reference the same implementation frameworks (WebCore, JSCore, etc.), it would not require a lot of work to keep UIWebView alive.

这篇关于WKWebView是否被设计为UIWebView的替代品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆