How do you always show the annotation callouts, i.e. don’t hide them when you tab the map view?

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The callout is shown when an
MKAnnotationViewis selected and the view’scanShowCalloutproperty is set toYES.It is then hidden when that
MKAnnotationViewis deselected. This occurs by tapping another annotation view, or by tapping outside of the currently selected annotation view.As the delegate of
MKMapView(conforming toMKMapViewDelegate), you are told when an annotation view is selected and deselected, but it’s too late to do anything about it.If you want to not deselect an annotation view, you should subclass
MKAnnotationViewand override thesetSelected:animated:method and stop the annotation view from being deselected.