之前一直没搞清楚MKAnnotationView和MKPinAnnotationView的区别,看apple的官方文档终于搞清楚了。
如果想创建以静态图片作为大头针图片的话,可以通过创建MKAnnotationView是实例。如果想使用apple自带的大头针则创建MKPinAnnotationView
- If the annotation can be represented by a static image, create an instance of the
MKAnnotationView
class and assign the image to itsimage
property; see “Using the Standard Annotation Views.”
- If you want to use a standard pin annotation, create an instance of the
MKPinAnnotationView
class; see “Using the Standard Annotation Views.”