UIImageView 添加毛玻璃效果
2017-04-28 本文已影响6人
FlowYourHeart
记录一下
主要是自己很少用,所以记录一下。
_imageView = [[UIImageView alloc] initWithFrame:self.bounds];
[self addSubview:_imageView];
UIBlurEffect* effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView* effectView = [[UIVisualEffectView alloc] initWithEffect:effect];
effectView.frame = _imageView.bounds;
[_imageView addSubview:effectView];