首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

MKMapView 怎么让map的anotation的callout自动显示

2012-09-28 
MKMapView 如何让地图的anotation的callout自动显示我是这么来实现的.首先在viewWillAppear? 方法中定义了

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方法里面执行这个操作

热点排行