user5455038
user5455038

Reputation:

Blur on MKMapView

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?

Upvotes: 0

Views: 787

Answers (1)

dcompiled
dcompiled

Reputation: 181

Did you try adding blurView to mapView's superview?

Works fine for me in Playground:

Blurred map view in Playground

Upvotes: 1

Related Questions