【问题标题】:How can I show the info on annotation without having to click on it?如何在无需单击的情况下显示注释信息?
【发布时间】:2013-02-25 05:48:48
【问题描述】:
for (MyAnnotation *a in dealerMapView.annotations) {
    // Your current position (if shown) is an annotation as well. Thus check for the right class!
    if ([a isKindOfClass:[MyAnnotation class]]) {
        // insert some smart if statement here, if you have multiple annotations!
        [[dealerMapView viewForAnnotation:a] setSelected:YES animated:YES];
    }
}

我使用了上面的代码,但是pin上没有显示信息。

【问题讨论】:

    标签: ios map annotations


    【解决方案1】:
    [self.dealerMapView selectAnnotation:myAnnotation2 animated:YES];
    

    我使用了这个语句,现在它在注释上显示信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-21
      • 1970-01-01
      • 1970-01-01
      • 2019-09-02
      • 2021-11-17
      • 2010-12-28
      • 1970-01-01
      • 2013-03-26
      相关资源
      最近更新 更多