I have a UIScrollView with lots of complex vector graphics rendered in tiled UIWebViews.
The problem is that there are unsightly visual glitches when the view is scrolled quite quickly (several, consecutive quick swipes) because the reused tiles contain a snapshot of the old render before they get refreshed. The end result is that the tiles moving out of the screen appear to immediately come back in through the other side, before their contents are suddenly redrawn.
I’m hoping theres some way to limit the maximum speed that a scrollview can be flicked at. I could just disable flick scrolling, but that wouldn’t be ideal.
If there’s a way to clear the saved render of the UIWebView, that might also be a good band-aid fix.
Solution 1
Hide the UIWebViews when they begin loading a page and show them when they finish via the UIWebView’s delegate (
UIWebViewDelegate).In
webViewDidStartLoad:hide the UIWebView (i.e.myWebView.hidden = YES;). InwebViewDidFinishLoad:show it again.It may be better to hide the webView elsewhere in your code, but showing it in the webViewDidFinishLoad: is a good idea. You’ll also want a background for the scrollview since you’ll see behind the UIWebView’s using this method.
Solution 2
Change the UIScrollView’s
decelerationRate