开发者

iOS: Should I always create a custom annotation class for my maps?

开发者 https://www.devze.com 2023-03-05 05:53 出处:网络
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 ?

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

精彩评论

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