Is WKWebView designed as a replacement of UIWebView?(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 检索文件?
推荐答案
更新: 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 的替代品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:WKWebView 是否设计为 UIWebView 的替代品?
基础教程推荐
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01