UIImageView *backImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"leftBackView"]];
[self.view addSubview:backImageView];
//添加毛玻璃效果
UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *effectview = [[UIVisualEffectView alloc] initWithEffect:blur];
effectview.alpha = 0.90f;
effectview.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
[backImageView addSubview:effectview];
使用毛玻璃前效果
使用毛玻璃后效果
网友评论