在须要模糊的UIView上。加入一个UIVisualEffectView对象就可以。

效果例如以下图:

代码例如以下:

UIImageView *imageview = [[UIImageViewalloc]
init];

imageview.,,
, );

imageview.image = [UIImageimageNamed:@"2"];

imageview.contentMode =UIViewContentModeScaleAspectFit;

imageview.userInteractionEnabled =YES;

[self.viewaddSubview:imageview];

UIBlurEffect *blur = [UIBlurEffecteffectWithStyle:UIBlurEffectStyleLight];

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

effectview.,,
imageview.,);

[imageviewaddSubview:effectview];

UIButton *btn = [UIButtonbuttonWithType:UIButtonTypeSystem];

btn.,,
, );

[btn setTitle:@"btn"forState:UIControlStateNormal];

[effectview.contentViewaddSubview:btn];

iOS开发交流群361513739

最新文章

  1. 文件IO函数和标准IO库的区别
  2. ThinkPHP3.2.3 跨域访问
  3. Crystal Reports拉报表报错:Error detected by database DLL
  4. CRC-16/XMODE X16+X12+X5+1 C#、C和java环境下实现
  5. XSS转码 && struts2 property标签的bug
  6. 下载和编译 Open XML SDK
  7. 《Mathematical Olympiad——组合数学》——操作和游戏
  8. 实战:sqlserver 数据实时同步到mysql
  9. CouldnotcreateServerSocketonaddress0.0.0.0/0.0.0.0:9083
  10. (iOS)Storyboard/xib小技巧
  11. java文字转成拼音
  12. 向EXECL文件中导入数据的同时插入图片
  13. 关闭Excel提示文件格式和扩展名不匹配的警告框
  14. fopen fclose feof fgets fetl
  15. C语言函数-strcat
  16. 大数据面试题——如何找出访问最多的IP
  17. Generative Adversarial Nets[EBGAN]
  18. [20180316]共享服务模式和直接路径读.txt
  19. ethereum/EIPs-161 State trie clearing
  20. Unity3D学习笔记(二十五):Json

热门文章

  1. 0502 php-变量、常量
  2. codevs1288 埃及分数(IDA*)
  3. SqlMap常用参数(一)
  4. mvp 不错的链接
  5. POJ 1118 求平面上最多x点共线
  6. Django html页面 'ascii' codec can't encode characters in position 8-10: ordinal not
  7. 初学Hibernate杂乱总结
  8. rabbit channel参数
  9. CSS的常用属性(一)
  10. 实现三联tab切换特效