【问题标题】:how can i show two different color's pin annotation in MKMapView?如何在 MKMapView 中显示两种不同颜色的 pin 注释?
【发布时间】:2011-01-13 03:07:27
【问题描述】:

我正在使用 MKMapView 注释来显示引脚。在我的项目中,有很多引脚掉落。我只想显示当前位置的引脚颜色和其他引脚颜色之间的差异。那么我怎样才能显示两个不同引脚的颜色当前位置和其他位置。

【问题讨论】:

    标签: ios4 mkmapview mkannotation


    【解决方案1】:
       // Identify which pin is being selected  
       if([[annotation title] isEqualToString:@"Current Location"]) 
       {   
         annView.pinColor = MKPinAnnotationColorRed;
       }
    

    还请检查此链接: Issue with Map Annotation and MKMapView in iOS 4.2?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多