Does iPhone/iPad UIWebView need to be active view to render?

浪尽此生 提交于 2019-12-05 14:19:46

I struggled with this problem for a while myself. UIWebView will not render unless it is added to a UIWindow object. However, this does not have to be the window you are using to show your app. You can make a separate UIWindow object, and attach the UIWebView to that and it will render just fine. However, UIWebView rendering is a slow process, so it will have a short delay before it is ready. When it is done, it will fire the webViewDidFinishLoad method to its delegate.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!