iOS8之后 ,模糊效果简单实现
2016-07-19 14:21
246 查看
iOS8,之后:
storyboard:
直接搜索 控件Visual Effect View with Blur 拉到需要模糊效果视图的上方;
纯代码:
// 创建需要的毛玻璃特效类型
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
// 毛玻璃view 视图
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
//添加到要有毛玻璃特效的控件中
effectView.frame = self.imageV.bounds;
[self.imageV addSubview:effectView];
//设置模糊透明度
effectView.alpha = .8f
storyboard:
直接搜索 控件Visual Effect View with Blur 拉到需要模糊效果视图的上方;
纯代码:
// 创建需要的毛玻璃特效类型
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
// 毛玻璃view 视图
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
//添加到要有毛玻璃特效的控件中
effectView.frame = self.imageV.bounds;
[self.imageV addSubview:effectView];
//设置模糊透明度
effectView.alpha = .8f
相关文章推荐
- 设置tableView的页眉和页脚
- iOS滚珠菜单动效
- iOS动效学习-推荐资料(最全)
- iOS中类方法和实例方法
- XCode中.h 和 .m 文件中的同一个@interface有何区别
- ios开发防止键盘遮住文本框
- iOS_隐藏顶部状态栏方式
- iOS开发之瀑布流
- 修改按钮上图片的大小-iOS
- 获取手机通讯录--ios
- iOS7 自定义navigationbar baritem左右间距
- IOS 知识小集(Status Bar变换)
- iOS应用程序内购/内付费(一)
- iOS开发的22个奇葩技巧
- iOS 常用小技巧
- iOS开发之--屏幕适配相关小结
- SYSBIOS FatFS文件系统的使用
- iOS存储数据的四种方式
- iOS内存管理之超级大坑-内存泄漏
- iOS 汉字转UTF-8编码