MKPinAnnotationView: Are there more than three colors available?

前端 未结 9 1402

According to the Apple docs, MKPinAnnotationView\'s pin color is available in red, green and purple. Is there any way to get other colors also? I\'ve found nothing in the do

9条回答
  •  野性不改
    2020-11-27 10:25

    Neither of the posted solutions work 100% if you are using the pin drop animation. Cannonade's solution is very neat because it allows the pin to still have both kinds of ends (the sharp point when falling and the one with the circular paper ripple) but unfortunately a glimpse of the original pin head colour can be seen when the pin bounces as it hits the map. yonel's solution of replacing the whole pin image means the pin falls with the circular paper ripple before it's even hit the map!

提交回复
热议问题