WZFlashButton

This is a custom button with flash-like effect. Inspired by Ripple Effect.

这是一个自定义的按钮,有着闪烁效果,灵感来自于 Ripple Effect

Demo

Build the project and run, you will find there are four different kind of WZFlashButton.

编译并运行这个项目,你将会发现几种不同类型的WZFlashButton。

  1. Outer flash without text
  2. Outer flash with text
  3. Inner flash without text
  4. Inner flash with text

Usage

Inner Flash Button - 按钮里面的闪烁效果

WZFlashButton *innerFlashButton = [[WZFlashButton alloc] initWithFrame:CGRectMake(100, 200, 200, 60)];
innerFlashButton.backgroundColor = [UIColor colorWithRed:42.0f/255.0f green:62.0f/255.0f blue:80.0f alpha:1.0f];
[self.view addSubview:innerFlashButton];

Outer Flash Button - 按钮外面的闪烁效果

WZFlashButton *outerRoundFlashButton = [[WZFlashButton alloc] initWithFrame:CGRectMake(100, 50, 50, 50)];
outerRoundFlashButton.buttonType = WZFlashButtonTypeOuter;
outerRoundFlashButton.layer.cornerRadius = 25;
outerRoundFlashButton.flashColor = [UIColor colorWithRed:240/255.f green:159/255.f blue:10/255.f alpha:1];
outerRoundFlashButton.backgroundColor = [UIColor colorWithRed:0 green:152.0f/255.0f blue:203.0f/255.0f alpha:1.0f];
[self.view addSubview:outerRoundFlashButton];

Set Click Block Callback - 设置按钮回调

innerFlashButton.clickBlock = ^(void) {
NSLog(@"Click Done");
};

Example - 例子

It is very easy to use WZFlashButton while get amazing effect, you can take a look at the following demo

使用起来非常的简单,你可以在编译的项目中查看demo。

[翻译] WZFlashButton的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. shiro学习笔记_0200_认证

    认证,身份验证,验证用户是否合法 在shiro中,用户需要提供principals (身份)和credentials(证明)给shiro,从而应用能验证用户身份: principals:用户的身份信息 ...

  2. ubuntu工具安装

    smplayer sudo add-apt-repository ppa:rvm/smplayer sudo apt-get update sudo apt-get install smplayer ...

  3. 在Linux上使用C语言编程获取IPv4地址及子网掩码

    在Linux上(如Ubuntu或CentOS), 获取某个Network Interface比如eth0的IP地址等信息,我们可以使用ifconfig或者ip addr show命令. $ ifcon ...

  4. 09 jdk1.5的并发容器:CopyOnWriteArrayList(转载)

    原文链接:http://ifeve.com/java-copy-on-write/ Copy-On-Write简称COW,是一种用于程序设计中的优化策略. 其基本思路是,从一开始大家都在共享同一个内容 ...

  5. [作业] Python入门基础---九九乘法表

    1.while 循环 : x = 1 while x < 10: y = 1 while y <=x: print('%d*%d=%2d' % (y,x,x*y),end = '\t') ...

  6. jmeter(4)——简单测试流程

    今天通过一个简单的例子梳理一下用jmeter进行测试的流程 1.确定被测网站:gogomall.com 2.制定测试指标:响应时间和错误率 3.设计测试场景 4.具体测试步骤 1>创建一个测试计 ...

  7. [译]用R语言做挖掘数据《七》

    时间序列与数据挖掘 一.实验说明 1. 环境登录 无需密码自动登录,系统用户名shiyanlou,密码shiyanlou 2. 环境介绍 本实验环境采用带桌面的Ubuntu Linux环境,实验中会用 ...

  8. 搭建Eclipse和MyEclipse的开发环境

    主要步骤: 下载并配置Eclipse 建立并运行一个简单的javaSE项目 下载并破解MyEclipse 整合Eclipse和MyEclipse 开发环境和Tomcat结合 关于这个配置也可以参考:h ...

  9. SpringMVC_关于<url-pattern>

    一.配置   在没有特殊要求的情况下,SpringMVC的中央调度器DispatcherServlet的<url-oattern/>常使用后缀匹配的方式,如写*do. 二.不能写为/* 这 ...

  10. 并发模型之Future设计模式

    一.Futrue模式 客户端发送一个长时间的请求,服务端不需等待该数据处理完成便立即返回一个伪造的代理数据(相当于商品订单,不是商品本身),用户也无需等待,先去执行其他的若干操作后,再去调用服务器已经 ...