Preload/predisplay tiles in a CATiledLayer?

Posted by jemmons on Stack Overflow See other posts from Stack Overflow or by jemmons
Published on 2009-07-15T20:31:51Z Indexed on 2010/04/08 8:03 UTC
Read the original article Hit count: 689

On the iPhone (though I imagine it's an equally valid question in Cocoa) I have a UIScrollView around a UIView backed by a CATiledLayer. The way it works by default is to load any uncached/unfetched tiles when my viewport scrolls over a blank section of the CATiledLayer.

What I would like to know is if there's a way to trigger CATiledLayer to load a tile that's not actively being displayed? I would like to, for example, preload all tiles contiguous to the currently displayed tile while they are still offscreen, thus avoiding flashing a blank screen that fades in to the image once it's loaded asynchronously.

Any ideas?

© Stack Overflow or respective owner

Related posts about core-animation

Related posts about iphone