开发者

Custom MKPinAnnotationView Colours

开发者 https://www.devze.com 2022-12-13 01:47 出处:网络
Is it possible to define custom colours f开发者_开发技巧or the MKPinAnnotationView colour rather than the default red, green or purple? Docs say no...

Is it possible to define custom colours f开发者_开发技巧or the MKPinAnnotationView colour rather than the default red, green or purple? Docs say no...

Thanks


    If you want to use annotation with color different from standard ones you should create your own image.
    If Apple's docs say no, you should trust them - even if there's undocumented (using private api) way to do something it will likely cause your app to be rejected from app store.


Yep. It is possible and doesn't involve any undocumented APIs:

MKPinAnnotationView: Are there more than three colors available?

0

精彩评论

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