自定义 MKPinAnnotationView 颜色

发布于 2024-08-14 03:47:48 字数 75 浏览 4 评论 0原文

是否可以为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼角的笑意。 2024-08-21 03:47:48

    如果您想使用与标准颜色不同的注释,您应该创建自己的图像。
    如果 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.

零崎曲识 2024-08-21 03:47:48

是的。这是可能的,并且不涉及任何未记录的 API:

MKPinAnnotationView:有吗超过三种颜色可供选择?

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

MKPinAnnotationView: Are there more than three colors available?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文