本文介绍了如何更改Apple Map(MKMapView)的背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个具有黑色主题的iOS应用程序,并且确实希望将显示的Apple Map也设置为黑色.

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

在本机文档中,没有任何关于更改MKMapView外观的内容.

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

我已经搜索了该主题,并试图更改MKOverlayView.但是,我什么都找不到.

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

这甚至有可能吗?我可以更改Apple Map的背景颜色吗?

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

谢谢.

推荐答案

您可以使用MapBoxKit

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

Mapkit中,您只能将暗模式设置为混合模式,如下所示:

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

在viewDidLoad中编写以下代码:-

in viewDidLoad write below code:-

 mapView.mapType = .Hybrid

需要在info.plist

您也可以从IB进行上述设置:-

also you can set from IB as above:-

这篇关于如何更改Apple Map(MKMapView)的背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 14:21