MKMapView change colors

自作多情 提交于 2020-01-05 07:16:15

问题


Anyone know of a way to change the colors of a MKMapView? Is there a way to XOR an image over or blend one that you could "possibly" create a "night version" of the map that isn't so bright?

Thanks!

Dan


回答1:


better solution would be to add custom colored overlays




回答2:


I guess you could create a UIView with a 50% alpha that covered the MKMapView, but then you will have UI problems. I am assuming the Satellite mode doesn't suit?




回答3:


What I ended up doing is adding a MKAnnotation with a 50% transparent black background color. Then I moved the annotation to the back of the stack maintained by the mapview, so that all the other annotations can still be interacted with.

Where it really gets interesting is when the map moves... OK if you are on iOS4 but a little tricky on iOS3 devices. Well, I figured it out eventually.




回答4:


I agree with @RolandasR, you can try creating a custom overlay as in this answer https://stackoverflow.com/a/13592117/3847



来源:https://stackoverflow.com/questions/1441230/mkmapview-change-colors

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