Blur on MKMapView

你说的曾经没有我的故事 提交于 2019-12-25 09:05:25

问题


I know this question has been asked before, but I am trying to put a blur on a map view in my app. Everything I've tried just tints the map including code like this:

var darkBlur = UIBlurEffect(style: UIBlurEffectStyle.Dark)
var blurView = UIVisualEffectView(effect: darkBlur)
blurView.frame = mapView.bounds
mapView.addSubview(blurView)

Is there a way to actually blur the map?


回答1:


Did you try adding blurView to mapView's superview?

Works fine for me in Playground:



来源:https://stackoverflow.com/questions/38510476/blur-on-mkmapview

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