美文网首页
UI总结-毛玻璃效果

UI总结-毛玻璃效果

作者: Dear丶Musk | 来源:发表于2016-05-14 21:07 被阅读103次

               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总结-毛玻璃效果

      本文链接:https://www.haomeiwen.com/subject/ecqvrttx.html