LoadHTMLString will not fire when scrolling UIScrollView

I am trying to lazy load UIWebViewsinside a UIScrollView. Each time a user scrolls, WebViews frames are updated and new content MUST be loaded. And this is exactly where I have problems. Repositioning works well, but new content (local NSStrings, which is called using loadHTMLString) does not appear until I stop ScrollingView scrolling.

I already read this thread: NSURLRequest will not fire while UIScrollView scrolls .

Having received inspiration from this, is there any connection between loadHTMLStringand NSURLConnection? I know almost nothing about NSURLConnection.

If this is not possible, is there another solution? Or pause scrolling for a while (for example, MobileRSS - App Store app) or alternative download methods?

Edit: My UIScrollView has paging enabled. Therefore, if I stopped the scroll for a while, this should happen on every page. But I still don’t know how to do it.

+3
source share
1 answer

Old question, but here is the answer for it.

You need to subclass the UIWebView and toggle the start-up loops launched at the overloaded load of HTMLML String: baseURL: and switch back after the html has been loaded (or not loaded).

github, , .

0

Source: https://habr.com/ru/post/1775330/


All Articles