美文网首页iOS开发
图片的高斯模糊处理

图片的高斯模糊处理

作者: 陈兔兔 | 来源:发表于2015-10-12 11:46 被阅读0次

//使用图片初始化

UIImageView *imm = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 220)];

[imm setImage:[UIImage imageNamed:@"2.jpg"]];

[self.view addSubview:imm];

//添加模糊

UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

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

effectview.frame = CGRectMake(0, 0, imm.frame.size.width, 220);

[imm addSubview:effectview];


效果图



相关文章

网友评论

    本文标题:图片的高斯模糊处理

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