How to edit the UIBlurEffect intensity?
Adjusting the blur itself is not possible... But, you can adjust how visible the blur view is. This can be done in a number of ways, only three of which I can think of at the moment:
1st Option: Adjust the alpha of your UIVisualEffectView instance e.g:
effectView.alpha = 0.4f;
2nd Option: Add a UIView instance to effectView at Index 0 and adjust the alpha of this UIView instance. e.g:
UIView *blurDilutionView = [[UIView alloc] initWithFrame: effectView.frame];
blurDilutionView.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent: 0.5];
blurDilutionView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;//if not using AutoLayout
[effectView insertSubview:blurDilutionView atIndex:0];
3rd Option: use multiple UIVisualEffectView instances (I have not tried this yet, more of an idea). Apply an alpha of 0.1f on each. The more UIVisualEffectView views you have the more blurry the overall look. Once again, I have not tried this option yet!
Update:
As Axeva mentioned in the comments, Apple advises against adjusting the alpha to change the blur. So use these suggestions at your own potential peril.
Less Blur with `Visual Effect View with Blur`?
The reason you're getting heavy blur is that the blur effect style affects the brightness level of the image, not the amount of blur applied.
Unfortunately, although Apple clearly has the ability to control the amount of blur applied programmatically--try dragging down slowly on the launchpad to watch the Spotlight blurring transition--I don't see any public API to pass a blur amount to UIBlurEffect
.
This post claims that adjusting the background color alpha will drive the blur amount. It's worth a try, but I don't see where that is documented: How to fade a UIVisualEffectView and/or UIBlurEffect in and out?
Related Topics
Swap Rootviewcontroller With Animation
Get Description of Emoji Character
Pull Down to Refresh Data in Swiftui
Lazy Initialisation and Retain Cycle
Is There a Zip Function to Create Tuples with More Than 2 Elements
Swift: Decode Imprecise Decimal Correctly
Returning a Value from a Function with Alamofire and Swiftyjson
Swift Firebase Must Be a Non-Empty String and Not Contain '.' '#' '$' '[' or ']'
Use Resources in Unit Tests with Swift Package Manager
Scanning Real-World Object and Generating 3D Mesh from It
Generating Random Numbers With Swift
Reference to Property in Closure Requires Explicit 'Self.' to Make Capture Semantics Explicit
Open Uidatepicker Programmatically in iOS 14
A Swift Protocol Requirement That Can Only Be Satisfied by Using a Final Class
How to Dispatch Functions in Swift the Right Way
Downloading and Caching Images from Url Asynchronously
What Is the Correct Date.Format for Mmm Dd, Yyyy Hh:Mm:Ss A? and How Convert to Dd-Mm-Yyyy Hh:Ii