iPhone Core Location: Custom pin image disappears when map type changes

余生长醉 提交于 2019-12-19 03:37:11

问题


I have a segmented controller which sits on a MKMapView. When I change MKMapType, the image of my custom pins revert to the default red. The title and subtitle, along with coordinates remain intact. Can anyone shed some light on a possible solution?


回答1:


I had a similar problem a while ago.

Why does a custom MKMapView annotation image disappear on touch?

Make sure you're using MKAnnotationView instead of MKPinAnnotationView everywhere in your viewForAnnotation method.



来源:https://stackoverflow.com/questions/3577691/iphone-core-location-custom-pin-image-disappears-when-map-type-changes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!