在浏览所有 Apple MapKit 文档时,我能找到的唯一“标准”注释 View 如下:
- MKAnnotationView :基本 View ,对于将静态图像显示为注释很有用。
- MKPinAnnotationView :显示 Pin 作为 map 上某个点的注释。
Apple 还提供其他标准注释 View 吗?他们只提供一个点吗?或者带有文字的点?
最佳答案
这是 Apple 提供的仅有的两个。当然,您可以创建自己的。请参阅the documentation :
Defining a Custom Annotation View
If a static image is insufficient for representing your annotation, you can subclass MKAnnotationView and draw content dynamically in one of the following two ways:
- Continue to use the image property of MKAnnotationView, but change the image at regular intervals.
- Override the annotation view’s drawRect: method and draw your content dynamically every time.
...
关于ios - Apple iOS MapKit 提供了哪些标准注释?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24613244/