MKPolyLineRenderer change color without removing overlay

假装没事ソ 提交于 2019-12-06 11:38:13

问题


I am developing an application that almost replicates Apple maps application behavior. When i touch a route, i need to change its color to blue and change the other ones colors to gray. Is there an efficient way to accomplish this without having to remove the overlays and adding them again ? Thanks.


回答1:


Yes:

  1. Make sure your annotation view has enabled = YES.

  2. Implement -[MKMapViewDelegate mapView:didSelectAnnotationView:].

  3. In that callback, get view and change its properties.



来源:https://stackoverflow.com/questions/24226290/mkpolylinerenderer-change-color-without-removing-overlay

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