1

I am using CATiledLayer to display a pdf page.. But the layer do have some time to draw context.

Therefore, I try to add an background beside this layer and remove the background after CATiledLayer is successful display..

My question is Is there any ways to detect the drawing status of CATiledLayer?

Thanks for your help.

Kevin
  • 49
  • 6

2 Answers2

0

subclass your CATiledLayer and make fadeDuration of tiledlayer to 0.0

CKT
  • 1,223
  • 4
  • 21
  • 39
0

A "hacky" way of doing is to pre-calculate how much tiles will be rendered, and then count the calls to - (void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context. It's a pretty insecure though and most likely only works on the initial zoom level. CATiledLayer caches its tiles and doesn't tell you what is cached and what will be redrawn.

steipete
  • 7,581
  • 5
  • 47
  • 81