读书人

MKMapView 怎么让map的anotation的cal

发布时间: 2012-09-28 00:03:35 作者: rapoo

MKMapView 如何让地图的anotation的callout自动显示

我是这么来实现的.

首先在viewWillAppear? 方法中定义了一个

?

[self performSelector:@selector(showCallout) withObject:nil afterDelay:1.0];

?

让方法showCallout在1.0秒钟后被调用.

?

- (void)showCallout {
??? [mapView selectAnnotation:attackedAnnotation animated:YES];
}

?

上面黄色的部分的方法是官方api中的方法.

?

?

1 楼 haipengno1 2011-01-18 你可以实现MKMapViewDelegate,在mapview的didAddAnnotationViews方法里面执行这个操作

读书人网 >移动开发

热点推荐