UI总结-毛玻璃效果

               UI总结-毛玻璃效果

self.view.backgroundColor = [UIColor whiteColor];

self.imagev = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 425, 735)];

self.imagev.backgroundColor = [UIColor greenColor];

[self.view addSubview:self.imagev];

[_imagev release];

self.imagev.image = [UIImage imageNamed:@"5.jpg"];

UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];

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

visual.frame = self.imagev.frame;

visual.alpha = 0.6;

[self.view addSubview:visual];

[visual release];

效果如下:

UI总结-毛玻璃效果_第1张图片

你可能感兴趣的:(UI总结-毛玻璃效果)