Carl Brusell
Carl Brusell

Reputation: 63

How do I regulate the level of UIVisualEffectView blur

I'm trying to make a UIVisualEffectView to make a nice blur effect in my view. But I think that the UIVisualEffectView generates a very strong blur.

I'm trying to regulate a level of blur to my UIVisualEffectView, I want a weak blur.

Do you know how to do that?

Upvotes: 5

Views: 1401

Answers (2)

kabarga
kabarga

Reputation: 803

Also you can use UIImage+ImageEffects.h category from WWDC 2013. It has more stuff to tune

e.g. from https://github.com/ParsePlatform/Anypic/tree/master/Anypic-iOS/Vendor/UIImageEffects

Upvotes: 2

Undo
Undo

Reputation: 25697

You can't do this with a UIVisualEffectView - the only options for blur are:

enum UIBlurEffectStyle : Int {
    case ExtraLight
    case Light
    case Dark
}

There's no property on UIBlurEffect, UIVisualEffect, or UIVisualEffectView for 'magnitude' of the blur.

This blog post is a good place to start if you want to 'roll your own' blur view with a custom magnitude.

Upvotes: 5

Related Questions