Hi folks,
I completely lost...
In my app I use a UIView backed by a CATiledLayer in a UIScrollView to implement infinite zooming: Works pretty well, when zooming in the tiles are redrawn using Core Graphics in the background, and updated to provide sharp content.
When I change some underlying data and the view must be redrawn, I trigger [view setNeedsDisplay], and the tiles are updated (unfortunately all tiles, but that seems to be a flaw in the CATiledLayer's design). But here comes the problem: Before each tile is redrawn, the complete view is turning blank, causing a kind of one-time flicker.
If I change the layer's class to CALayer, new content just replaces old one with a much smoother effect, so my drawRect: method is not causing the problem.
How do I implement a CATiledLayer which doesn't blank all tiles before redrawing them after a [view setNeedsDisplay]? Or what can I do to avoid at least the impact (e. g. creating my own backing layer behind the CATiledLayer)?
Mattes
I completely lost...
In my app I use a UIView backed by a CATiledLayer in a UIScrollView to implement infinite zooming: Works pretty well, when zooming in the tiles are redrawn using Core Graphics in the background, and updated to provide sharp content.
When I change some underlying data and the view must be redrawn, I trigger [view setNeedsDisplay], and the tiles are updated (unfortunately all tiles, but that seems to be a flaw in the CATiledLayer's design). But here comes the problem: Before each tile is redrawn, the complete view is turning blank, causing a kind of one-time flicker.
If I change the layer's class to CALayer, new content just replaces old one with a much smoother effect, so my drawRect: method is not causing the problem.
How do I implement a CATiledLayer which doesn't blank all tiles before redrawing them after a [view setNeedsDisplay]? Or what can I do to avoid at least the impact (e. g. creating my own backing layer behind the CATiledLayer)?
Mattes