模糊

关于模糊的函数

- (void)addBlurredEffectWithImageView:(UIImageView *)imageView {
    UIVisualEffect *blurEffect;
    blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
    UIVisualEffectView *visualEffectView;

    visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
    visualEffectView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
    [imageView addSubview:visualEffectView];
}

猜你喜欢

转载自blog.csdn.net/haixing_zfj/article/details/76926919