IOS image sets frosted glass effect

  • 2020-05-24 06:15:38
  • OfStack

Recommended reading: the realization of ios frosted glass effect and three methods of image blur effect

Without further ado, I directly attached the code to you, as shown below:

// create the required frosted glass effect type


UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

// frosted glass view view


UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];

// add to the control to have frosted glass effects


effectView.frame = self.SecuritySettingImgV.bounds;
[self.SecuritySettingImgV addSubview:effectView];

// set the blur transparency


effectView.alpha = .2f;

About ios picture Settings frosted glass effect this site to introduce you here, I hope to help you!


Related articles: