Hi Reader's,
This blog includes the code which is used to blur UIView in iOS in a very simple way. This code can be used according to the need of the user to blur the UIView. Code is given below which includes how to blur UIView and how to remove blur after use:-
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
UIVisualEffectView *bluredVisualEffectView = [[UIVisualEffectView alloc] initWithEffect: blurEffect];
bluredVisualEffectView.frame = self.view.bounds;
[self.view addSubview:bluredVisualEffectView];
Remove blur from UIView after use can be done with the help of only one line code given below:-
[bluredVisualEffectView removeFromSuperview];
I hope this blog will help you to easily blur any UIView.
0 Comment(s)