iOS8 模糊效果

模糊效果有几种实现方式

1.GPUImage

2.coreIamge

3.UIBlurEffect (iOS8+)



上代码:


if (!_blurView) {

UIImageView * imgView = [[UIImageView alloc] initWithFrame:self.bounds];

imgView.contentMode = UIViewContentModeScaleAspectFit;

UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

UIVisualEffectView *effectview = [[UIVisualEffectView alloc] initWithEffect:blur];

[effectview setFrame:self.bounds];

[imgView addSubview:effectview];

_blurView = imgView;

}

return _blurView;

}



你可能感兴趣的:(iOS8 模糊效果)