iOS8,之後:
storyboard:
直接搜索 控件Visual Effect View with Blur 拉到需要模糊效果視圖的上方;
純代碼:
// 創建需要的毛玻璃特效類型
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
// 毛玻璃view 視圖
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
//添加到要有毛玻璃特效的控件中
effectView.frame = self.imageV.bounds;
[self.imageV addSubview:effectView];
//設置模糊透明度
effectView.alpha = .8f