码迷,mamicode.com
首页 > 移动开发 > 详细

iOS 8 毛玻璃效果

时间:2015-06-23 19:39:30      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:

  UIImage *image = [UIImage imageNamed:@"icon"];
    UIImageView *bgView = [[UIImageView alloc] initWithImage:image];
    bgView.frame = CGRectMake(100, 300, 100, 100);
    [self.view addSubview:bgView];
    
    UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
    UIVisualEffectView *blurView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
    blurView.frame = bgView.frame;
    [self.view addSubview:blurView];

 

iOS 8 毛玻璃效果

标签:

原文地址:http://www.cnblogs.com/airy99/p/4595873.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!