几行代码实现图片的模糊效果

//    创建一个imageView

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

    backImageView.image = [UIImage imageNamed:@"guidance03@3x.jpg"];

    [self.view addSubview:backImageView];

    

//添加模糊效果

    UIBlurEffect * blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

    UIVisualEffectView * effectView = [[UIVisualEffectView alloc]initWithEffect:blurEffect];

    effectView.frame = CGRectMake(0, 64, self.view.frame.size.width, 300);

    [backImageView addSubview:effectView];