开发者

Show callout bubble without user interaction

How to show cal开发者_JAVA技巧lout bubble without the user tapping on the pin ??


(Assuming you're talking about annotations on MKMapView)

Call [mapView selectAnnotation:yourAnnotation animated:YES]; with your annotation object


It can be done as Vladimir said, but I think you need to do it after the MKAnnotationView related to your annotation is shown.

You can use the method below (which is a method defined in MKMapViewDelegate) to get informed when an annotation view is added to your MKMapView:

-(void) mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views

So, basically you need to invoke the method mentioned by Vladimir

[mapView selectAnnotation:yourAnnotation animated:YES];

in the implementation of the delegate method I mentioned above

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜