FXBlurView是UIView的子类,它实现毛玻璃效果的原理其实就是覆盖上一层FXBlurView的实例对象。

 - (void)viewDidLoad {
[super viewDidLoad]; UIImageView * imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
imageView.image = [UIImage imageNamed:@"Default-Port-hd47"];
[self.view addSubview:imageView]; FXBlurView * aview = [[FXBlurView alloc] initWithFrame:CGRectMake(, , , )];
aview.tintColor = [UIColor whiteColor]; //前景颜色
aview.blurRadius = 20.0; //模糊半径
aview.dynamic = YES; //动态改变模糊效果
[self.view addSubview:aview]; FXBlurView * bview = [[FXBlurView alloc] initWithFrame:CGRectMake(, , , )];
bview.tintColor = [UIColor whiteColor]; //前景颜色
bview.blurEnabled = YES; //是否允许模糊,默认YES
bview.blurRadius = 10.0; //模糊半径
bview.dynamic = YES; //动态改变模糊效果
bview.iterations = ; //迭代次数:
bview.updateInterval = 2.0; //更新时间(不确定具体功能) /*
blurRadius = 1.0 && dynamic = 100 的效果和 blurRadius = 10.0 && dynamic = 1的效果大致相同
*/ [self.view addSubview:bview]; FXBlurView * cview = [[FXBlurView alloc] initWithFrame:CGRectMake(, , , )];
cview.blurRadius = 20.0;
cview.tintColor = [UIColor whiteColor];
[self.view addSubview:cview];
}

demo下载:https://github.com/nicklockwood/FXBlurView

FXBlurView用法的更多相关文章

  1. EditText 基本用法

    title: EditText 基本用法 tags: EditText,编辑框,输入框 --- EditText介绍: EditText 在开发中也是经常用到的控件,也是一个比较必要的组件,可以说它是 ...

  2. jquery插件的用法之cookie 插件

    一.使用cookie 插件 插件官方网站下载地址:http://plugins.jquery.com/cookie/ cookie 插件的用法比较简单,直接粘贴下面代码示例: //生成一个cookie ...

  3. Java中的Socket的用法

                                   Java中的Socket的用法 Java中的Socket分为普通的Socket和NioSocket. 普通Socket的用法 Java中的 ...

  4. [转载]C#中MessageBox.Show用法以及VB.NET中MsgBox用法

    一.C#中MessageBox.Show用法 MessageBox.Show (String) 显示具有指定文本的消息框. 由 .NET Compact Framework 支持. MessageBo ...

  5. python enumerate 用法

    A new built-in function, enumerate() , will make certain loops a bit clearer. enumerate(thing) , whe ...

  6. [转载]Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法总结

    本文对Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法进行了详细的总结,需要的朋友可以参考下,希望对大家有所帮助. 详细解读Jquery各Ajax函数: ...

  7. 【JavaScript】innerHTML、innerText和outerHTML的用法区别

    用法: <div id="test">   <span style="color:red">test1</span> tes ...

  8. chattr用法

    [root@localhost tmp]# umask 0022 一.chattr用法 1.创建空文件attrtest,然后删除,提示无法删除,因为有隐藏文件 [root@localhost tmp] ...

  9. 萌新笔记——vim命令“=”、“d”、“y”的用法(结合光标移动命令,一些场合会非常方便)

    vim有许多命令,网上搜有一堆贴子.文章列举出各种功能的命令. 对于"="."d"."y",我在无意中发现了它们所具有的相同的一些用法,先举 ...

随机推荐

  1. DevExpress控件汉化类 z

    更新了一些字段,VER9.3.3 using System; using DevExpress.XtraEditors.Controls; using DevExpress.XtraGrid.Loca ...

  2. selenium webdriver(1)---浏览器操作

    启动浏览器 如何启动浏览器已在上篇文章中说明,这里还是以chrome为例,firefox.IE启动方式相同. //启动浏览器 import org.openqa.selenium.WebDriver; ...

  3. Naive and Silly Muggles

    Problem Description Three wizards are doing a experiment. To avoid from bothering, a special magic i ...

  4. DAL与数据库类型的对应关系

    MSSQL Server类型 DbType类型 C#类型   MySql类型 DbType类型 C#类型 bit Boolean bool   bit(1) Boolean bool tinyint ...

  5. 修复直接删除linux系统后grub丢失错误

    如果删除了系统后,grub丢失,开机出现“grub>”的话,可以用如下代码进入目标linux系统:grub>ls (hd0,X)/boot             //x为目标系统所在分区 ...

  6. Y2K Accounting Bug

    题目: Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost som ...

  7. PAT 1069. The Black Hole of Numbers (20)

    For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in ...

  8. 连接数据库超时设置autoReconnect=true

    1,问题现象: com.mysql.jdbc.CommunicationsException: The last packet successfully received from the serve ...

  9. Day 4 @ RSA Conference Asia Pacific & Japan 2016

    09.00 – 09.45 hrs Advanced Malware and the Cloud: The New Concept of 'Attack Fan-out' Krishna Naraya ...

  10. ElasticSearch怎样加入,检索数据

    Elasticsearch是一个分布式的文档(document)存储引擎.它能够实时存储并检索复杂数据结构--序列化的JSON文档.换言说,一旦文档被存储在Elasticsearch中,它就能够在集群 ...