3

我在地图上有带有自定义图钉图像的注释视图。当我点击并按住某个图钉时,我的自定义图像消失并被默认的红色图钉取代。此默认图像以其选定(突出显示)状态显示(看起来稍暗)。如何防止所选状态图像替换我的自定义图像?

非常感谢。

4

1 回答 1

6

Found the solution: I was incorrectly using the class MKPinAnnotationView instead of MKAnnotationView for my annotations. When the custom pin was tapped, causing it to darken (in its highlight state), the custom image was being replaced by the default pin that underlines MKPinAnnotationView.

于 2010-09-09T01:00:30.587 回答