开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜