开发者

SetNeedsDisplayInRect not taking effect immediately

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 o开发者_如何学Pythonverlays and the setNeedsDisplayInMapRect:zoomScale: and drawMapRect:zoomScale:inContext: methods, but I had this problem previously with just a scrollview and a CATiledLayer.


shouldn't you be using

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

not drawRect:inContext:

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜