//毛玻璃效果 (UIImageView)
2017-08-08 本文已影响0人
伟伟机器人
//毛玻璃效果 (背景)
UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *effectview = [[UIVisualEffectView alloc] initWithEffect:blur];
effectview.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
//修改透明度
effectview.alpha = 0.5f;
[self.imageView addSubview:effectview];