CATiledLayer not redrawing when visible

Originator:hamish
Number:rdar://6941930 Date Originated:02-Jun-2009 11:14 PM
Status:Closed Resolved:
Product:iPhone Product Version:3.0 beta 5
Classification:Serious bug Reproducible:Always
 
The attached project sets up a UIScrollView whose content view's layer contains twenty simple CATiledLayers laid out in ten rows of two.

Each layer has -setNeedsDisplay called on it when created. The drawing method is very simple and just fills a white rect. However, when the app is first run, not all of the tiled layers have their rects filled. When the user scrolls by just a very small amount, more tiled layers are drawn; a small amount more, and all tiled layers are drawn.

All visible tiled layers should be drawn immediately, rather than only after scrolling has occurred.

If you replace the "white square" layers with plain CALayers rather than CATiledLayers, they all draw in time, as you would expect.

Also, 2.2.1 seems to do better (in the simulator, at least) than 3.0 beta 5.

Comments

Possible workaround

See http://stackoverflow.com/questions/5198155/not-all-tiles-redrawn-after-catiledlayer-setneedsdisplay for a workaround that worked for me.

Hi!

Did you get any feedback on this bug? I'm experiencing a similar issue - testing in iOS 4.x device/sim

I'm hitting a brick wall here :(

By mat.wilkinson at April 2, 2011, 7:26 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!