0
votes

I have a UIViewController that displays the MKPinAnnotation callout, using a XML source to display the related title and subtitle that I want. Is it possible to use the same UIViewController, but with an image this time as I would need to do another callout whereby I load the title/subtitle and image?

Is it possible to use the same UIViewController for the callout, but different sources? e.g. XML and retrieval from database?

2
your question is not clear, can you explain a little more.Robin
Currently in my application,i'm displaying pins based on an xml file that i load.When the user taps on the callout,it displays a UIViewController with title and subtitle.But,what i need to do now's that i need to display an image in the viewcontroller too,but load the title,subtitle and image from a database.I'm wondering if its possible to use the same viewcontroller.user848369
Are you subclassing the MKAnnotationView or you are using the apple provided.Robin
@robin I'm subclassing the MKAnnotationView,i think.What do u mean by the one apple provided?user848369

2 Answers

0
votes

you can use it but look into the documentation for the mapView. Try overriding the pin and the view functions so it can display a custom image.

0
votes

You can use image property of the MKAnnotationView to show your image or you can use leftCalloutAccessoryView to add a uiimageview with your image to show on callout.