问这个问题是因为我不知道为什么 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 检索文件?
更新: UIWebView
现已弃用,Apple 正在积极劝阻开发人员不要使用它.
Update: UIWebView
is now deprecated and Apple is actively discouraging developers from using it.
有几个原因,包括安全性(进程外模型)、性能和内存管理.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 的替代品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!