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?
Adding a UIBlurEffect In order for UIVisualEffectView to actually blur the content, its superview must be transparent. To make it transparent, change the background color of view to clear . Create a UIBlurEffect with a UIBlurEffect. Style.
image = UIImage(ciImage: blurred!) } }
Swift provides with different ways of displaying visual effects like blur and vibrancy effects. These can mostly be used as background for views and can be used to improve the overall app design. You can observe these blur effects throughout iOS like in app library, control center and app dock.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With