0

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.

paxswill
  • 1,200
  • 9
  • 13
  • Will - did you ever solve this? I have a very similar problem, which I've posted about here: http://stackoverflow.com/questions/10128447/setneedsdisplayinmaprect-doesnt-trigger-new-drawmaprect-call – TomSwift Apr 12 '12 at 19:30

1 Answers1

0

shouldn't you be using

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

not drawRect:inContext:

pixeled
  • 51
  • 1
  • 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 Jul 29 '10 at 04:26