自定义 MKPinAnnotationView 颜色
是否可以为 MKPinAnnotationView 颜色定义自定义颜色而不是默认的红色、绿色或紫色?文档说不...
谢谢
Is it possible to define custom colours for the MKPinAnnotationView colour rather than the default red, green or purple? Docs say no...
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想使用与标准颜色不同的注释,您应该创建自己的图像。
如果 Apple 的文档说不,您应该相信他们 - 即使有未记录的(使用私有 api)方法来执行某些操作,也可能会导致您的应用程序被应用程序商店拒绝。
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.
是的。这是可能的,并且不涉及任何未记录的 API:
MKPinAnnotationView:有吗超过三种颜色可供选择?
Yep. It is possible and doesn't involve any undocumented APIs:
MKPinAnnotationView: Are there more than three colors available?