What's the difference between MKAnnotation
and MKMapItem
?
Which one to use when I want to display some interesting places on my map?
I have a list of objects that have latitude
, longitude
, title
, description
and photo
so far and I'd like to have them on my map.
MKAnnotation is a MARKER meant for displaying stuff using a MKAnnotationView
so the procedure is:
a good tutorial (IMO) that shows this with detailed code is at: http://www.codigator.com/tutorials/mapkit-tutorial-for-ios-beginners/
MKMapItem is only for the openMapWithItem api that opens the external app!
EDIT: MKMapItem has a placemark property which is a MKAnnotation - so if that's non-nil you can add it. (note that it might be nil)