In my app i'm adding alot of pins and in viewForAnnotaion
I set animatesDrop=TRUE
on my MKPinAnnotaionView
. The problem is that when having 200+ pins dropping one by one takes a long time. I have seen Apps that drops all pins at once and wonder how to do that.
Let me know if i'm not 开发者_如何学Cclear.
Thanks!
What you are doing is not wrong - but you might want to try creating those pins on a secondary thread (your app will be snappier).
Also, you might have operations that are computationally expensive that you might want to move outside the delegate method (i.e. viewForAnnotation
).
Finally, you can try closing in on a smaller area, so that your map displays less pins.
I think it is done programmatically by detecting that pins are closest.
You could build differents list of pins depending on the map zoom to display only pins that are separates of x pixels on the screen.
精彩评论