MKAnnotationView和MKPinAnnotationView的区别

来源:互联网 发布:政务数据开放平台方案 编辑:程序博客网 时间:2024/04/28 21:35

之前一直没搞清楚MKAnnotationView和MKPinAnnotationView的区别,看apple的官方文档终于搞清楚了。


如果想创建以静态图片作为大头针图片的话,可以通过创建MKAnnotationView是实例。如果想使用apple自带的大头针则创建MKPinAnnotationView



  • If the annotation can be represented by a static image, create an instance of theMKAnnotationView 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.”