开发者

Custom MKAnnotation Image goes back to default when I attempt to drag

I've got a bunch of MKAnnotations that don't need dragging. I set this by [pin 开发者_如何学编程setDraggable:NO]. I'm having an issue when I touch the annotation and (accidentally) drag off an annotation, it instantly looses it's custom image and changes back to the default red pin. How do I prevent this from happening?


In the viewForAnnotation delegate method, make sure the view is created as an MKAnnotationView and not an MKPinAnnotationView (which is a subclass of MKAnnotationView that automatically provides a pin image).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜