开发者

Xcode MapView Annotation Shown by Default

开发者 https://www.devze.com 2023-03-22 05:27 出处:网络
I would like to show the pop up of the annotation, (the title开发者_JAVA百科 and sub title) by default when the map load. Instead of waiting for user to click on it.

I would like to show the pop up of the annotation, (the title开发者_JAVA百科 and sub title) by default when the map load. Instead of waiting for user to click on it.

So i would like them to be shown by default and unable to be click away or disappear. Please enlighten me. Thank you!


  1. you can use -[MKMapView selectAnnotation:animated:] method to select any annotation programmatically. I recommend you doing that in MKMapViewDelegate's mapView:didAddAnnotationViews: method.
  2. I think there is no way to keep annotation selected. as a workaround I can only suggest you selecting the annotation again after user deselects it. ugly solution though. another solution is creating your own annotation views that will look exactly like standard popups.
0

精彩评论

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

关注公众号