之前一直没搞清楚MKAnnotationView和MKPinAnnotationView的区别,看apple的官方文档终于搞清楚了。
如果想创建以静态图片作为大头针图片的话,可以通过创建MKAnnotationView是实例。如果想使用apple自带的大头针则创建MKPinAnnotationView
- If the annotation can be represented by a static image, create an instance of the
MKAnnotationViewclass and assign the image to itsimageproperty; see “Using the Standard Annotation Views.”
- If you want to use a standard pin annotation, create an instance of the
MKPinAnnotationViewclass; see “Using the Standard Annotation Views.”
本文详细解释了MKAnnotationView与MKPinAnnotationView之间的主要区别:前者用于创建自定义图标作为地图上的标记,后者则使用系统提供的标准大头针样式。
4607

被折叠的 条评论
为什么被折叠?



