Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个几乎复制 Apple 地图应用程序行为的应用程序。当我触摸一条路线时,我需要将其颜色更改为蓝色并将其他颜色更改为灰色。有没有一种有效的方法来实现这一点而不必删除覆盖并再次添加它们?谢谢。
是的:
确保您的注释视图具有enabled = YES.
enabled = YES
实施-[MKMapViewDelegate mapView:didSelectAnnotationView:]。
-[MKMapViewDelegate mapView:didSelectAnnotationView:]
在该回调中,获取view并更改其属性。
view