开发者

Loading page into cache without using UIWebview

开发者 https://www.devze.com 2023-03-27 22:05 出处:网络
I want to load few local html pages into UIWebview, but UIWebview is sometimes taking 2-3 seconds to load these pages the first time. I wanted to know how can I load couple of those pages at a time in

I want to load few local html pages into UIWebview, but UIWebview is sometimes taking 2-3 seconds to load these pages the first time. I wanted to know how can I load couple of those pages at a time into memory prior to displaying through UIWebview? Is that possibl开发者_开发知识库e?

Thanks for your help.


You could have a UIWebView in the same XIB as a normal view and hide it behind the normal view. Then, when the user needs to see the UIWebView, use this code:

[self.view bringSubviewToFront:webView];

I don't know if this is the best method, but it'll work. Now the UIWebView is actually open and actively loading a web page and the user doesn't even know.

0

精彩评论

暂无评论...
验证码 换一张
取 消