Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个小项目,它将显示源和距离跟踪路线,我已经完成了,现在我无法为源和目标添加两个不同颜色的注释引脚,假设我使用红色作为源和绿色的目的地。对于正在学习和工作的每个人来说,这可能是巨大的帮助。谢谢
您可以使用图像作为您的引脚,也可以使用 - 的子类,MKAnnotationView只需MKPinAnnotationView更改pinColor属性,可以在此处找到它的文档:
MKAnnotationView
MKPinAnnotationView
pinColor
http://developer.apple.com/library/ios/#DOCUMENTATION/MapKit/Reference/MKPinAnnotationView_Class/Reference/Reference.html#//apple_ref/occ/cl/MKPinAnnotationView