MKPolyLineRenderer在不删除叠加层的情况下更改颜色 [英] MKPolyLineRenderer change color without removing overlay

查看:303
本文介绍了MKPolyLineRenderer在不删除叠加层的情况下更改颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个几乎复制Apple地图应用程序行为的应用程序。当我触摸路线时,我需要将其颜色更改为蓝色并将其他颜色更改为灰色。是否有一种有效的方法来实现这一点,而无需删除叠加并再次添加它们?谢谢。

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. 确保您的注释视图具有 enabled = YES

实施 - [MKMapViewDelegate mapView:didSelectAnnotationView:]

在该回调中,获取 view 并更改其属性。

In that callback, get view and change its properties.

这篇关于MKPolyLineRenderer在不删除叠加层的情况下更改颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆