Search code examples
iosipadretina-display

CATiledLayer clears all tiles when scrolling ONLY on Retina


And more problems with CATiledLayer on retina...

So I got it working a lot better on retina by just doubling the size of the tiles. Now it loads about as fast as an iPad1...

Now I am seeing a problem where every time I start to scroll or zoom, all the tiles clear then redraw which takes about a second. This only occurs using the iPad 3 and was occuring before I changed the code to resize the tiles. Any ideas?


Solution

  • I spoke with an Apple engineer about this and the short answer is that iOS only has X amount of memory available for caching a CATiledLayer and on the Retina display of the iPad, there are just too many pixels to use more than one layer.

    I had been using two CATileLayers to display a map view and a drawing view on top. I removed the second CATiledLayer and the problem went away.