如何在不必点击它的情况下显示注释信息?

时间:2013-02-25 05:48:49

标签: ios map annotations

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];
    }
}

我使用了上面代码,但信息没有显示在引脚上。

1 个答案:

答案 0 :(得分:0)

[self.dealerMapView selectAnnotation:myAnnotation2 animated:YES];

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