Xcode MapView Annotation Shown by Default
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!
- you can use
-[MKMapView selectAnnotation:animated:]
method to select any annotation programmatically. I recommend you doing that in MKMapViewDelegate'smapView:didAddAnnotationViews:
method. - 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.
精彩评论