Welcome

首页 / 移动开发 / IOS / IOS图片设置毛玻璃效果

推荐阅读:ios毛玻璃效果的实现及图片模糊效果的三种方法
废话不多说了,直接给大家贴代码了,具体代码如下所示:
// 创建需要的毛玻璃特效类型
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
// 毛玻璃view 视图

UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
//添加到要有毛玻璃特效的控件中

effectView.frame = self.SecuritySettingImgV.bounds;[self.SecuritySettingImgV addSubview:effectView];
//设置模糊透明度

effectView.alpha = .2f;
关于ios图片设置毛玻璃效果小编就给大家介绍到这里,希望对大家有所帮助!