iOS: Should I always create a custom annotation class for my maps?
Should I always create a custom annotation class in order to add an annotation to a map ?
More precisely, 开发者_高级运维do I need to subclass a NSObject implementing MKAnnotation protocol ?
Or is there already an annotation class in SDK, and I can just set latitude and longitude ?
thanks
The MKPlacemark, MKPointAnnotation, MKCircle, MKMultiPoint, MKPolygon, and MKPolyline classes all implement the MKAnnotation protocol.
MKPointAnnotation is probably the simplest one to use, if you just need to set coordinates.
精彩评论