How to change Apple Map (MKMapView) background colors?

ⅰ亾dé卋堺 提交于 2019-12-12 11:24:50

问题


I've Required an iOS application with a black theme, and would really like to make the displayed Apple Map also in black colors.

I see nothing in the native documentation that talks about changing look for MKMapView.

I've Googled the topic and tried to change MKOverlayView.But, I couldn't find anything.

Is this even possible? Can I change the background colors of the Apple Map.

Thank you.


回答1:


You can customize map using MapBoxKit

https://www.mapbox.com/ios-sdk/api/3.6.4/runtime-styling.html

In Mapkit you can only set dark mode as hybrid as follow:

in viewDidLoad write below code:-

 mapView.mapType = .Hybrid

Need to add Privacy - Photo Library Usage Description in info.plist

also you can set from IB as above:-



来源:https://stackoverflow.com/questions/46783527/how-to-change-apple-map-mkmapview-background-colors

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