iOS8之后 ,模糊效果简单实现
iOS8,之后:
storyboard:
直接搜索 控件Visual Effect View with Blur 拉到需要模糊效果视图的上方;
纯代码:
// 创建需要的毛玻璃特效类型
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
// 毛玻璃view 视图
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
//添加到要有毛玻璃特效的控件中
effectView.frame = self.p_w_picpathV.bounds;
[self.p_w_picpathV addSubview:effectView];
//设置模糊透明度
effectView.alpha = .8f
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。