image markers on MKMapView

2019-06-27 05:10发布

Need to use own imaged markers instead built-in pins. I have several questions. 1. Is it legally? I have a doubt because there is no standard support for markers(pins) with own icon.

  1. How to make a marker with own icon right way? I found the post which actually describe how-to: http://www.arlingtondev.com/thoughts/?p=81. I am a newbie, but it looks like a "crutch", which i do not want to use in my clean code. Could you advise better way? I had a lot of problems while integrate that method and currenlty cannot move and animate icons, that's why decided to ask stackoverflowers.

1条回答
ら.Afraid
2楼-- · 2019-06-27 05:27

Yes, you can. Check the MKAnnotationView class, it's specifically designed for that. In fact, MKPinAnnotationView inherits from it. Use the image field to specify an image.

查看更多
登录 后发表回答