How do I add custom pins to the iPhone MapKit?

后端 未结 4 425
小鲜肉
小鲜肉 2020-12-05 19:25

I\'m testing out the MapKit framework on the iPhone and would really much like to switch the standard pin that displays a location to an image called \"location.png\".

4条回答
  •  死守一世寂寞
    2020-12-05 19:53

    Check out the MapCallouts sample code, there's a custom pin using an image in there.

    http://developer.apple.com/iphone/library/samplecode/MapCallouts/Introduction/Intro.html

    Note that if you're testing on OS 3.0 you'll need to comment out one line of code (it won't build until you do that).

提交回复
热议问题