图片上Tina及毛玻璃效果

    UIImageView *backgroundView = [[UIImageView alloc] init];

    [backgroundViewsd_setImageWithURL:[NSURL URLWithString:self.strTopImageView] placeholderImage:[UIImage imageNamed:@"devotion_bannerB"]];

    backgroundView.frame=CGRectMake(0,0,ScreenWidth,180);

    backgroundView.contentMode = UIViewContentModeScaleAspectFill;

    backgroundView.userInteractionEnabled=YES;

    [self.viewaddSubview:backgroundView];

//添加毛玻璃效果

    UIBlurEffect *effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

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

    effectView.frame=CGRectMake(0,0, backgroundView.frame.size.width*1.0, backgroundView.frame.size.height);

    effectView.alpha=0.7;

    [backgroundViewaddSubview:effectView];

你可能感兴趣的:(图片上Tina及毛玻璃效果)