tags:

views:

59

answers:

1

When I call setNeedsDisplayInRect:, why isn't my drawRect:inContext method being called soon after? If I zoom into the unpainted area, then zoom out (I guess triggering a repaint) the image will be drawn. But if I leave it sitting there, no dice. Is there a way to force a repaint immediately?

Just in case it matters, I'm really using MapKit's overlays and the setNeedsDisplayInMapRect:zoomScale: and drawMapRect:zoomScale:inContext: methods, but I had this problem previously with just a scrollview and a CATiledLayer.

A: 

shouldn't you be using

  • (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context

not drawRect:inContext:

pixeled
I am using that method (second paragraph). It seems to be working better now for some reason, but I still get some tiles that won't draw even if they're supposed to (by invalidating them with `setNeedsDisplayIn`…).
paxswill