Implementing CATiledLayer in a UIWebView for Fast Scrolling

I have a large webview in my iPad app, and scroll performance seems like a big problem, especially the first time you view a webview. On mobile Safari, scrolling is extremely smooth, and the page just looks like a transparent checkerboard pattern and loads when it appears in sight. From what I read, the way to handle this is to use CATiledLayer, but I have no idea how to implement this. Can someone point me in the right direction? Thank!

+1
source share
1 answer

UIWebView should already be doing its own tiling behind the scenes. It is not possible to manually return a UIWebView with the CATiledLayer that I know of, due to its complex rendering architecture.

If you are creating a UIWebView that is only the size of the display, the only reason I could think of a slower scrolling than Mobile Safari is because there are other overlays that need to be arranged in the web view when scrolling.

+4
source

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


All Articles