[翻译] WZFlashButton
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。
- Outer flash without text
- Outer flash with text
- Inner flash without text
- 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的更多相关文章
- 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...
- 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...
- [翻译]开发文档:android Bitmap的高效使用
内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...
- 【探索】机器指令翻译成 JavaScript
前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...
- 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...
- 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...
- 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...
- 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?
0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...
- ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点
在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...
随机推荐
- Java学习之路(六):集合
集合的由来 数组的长度是固定的,当添加的元素超过了数组的长度,就需要对数组重新定义 java内部给我们提供的集合类,能存储任意对象,长度是可以改变的.随着元素的增加而增加,随着元素的减少而减少 数组和 ...
- DesUtils工具类
public final class DesUtils { private static final String DES = "DES"; private static fina ...
- unity 2018获取本地ip 问题,ipaddress
Network.Player.ipAddress这个API在Unity2018被移除了 用如下代码 using System.Net; using System.Net.NetworkInformat ...
- Struts2 数据驱动
在servlet中获取页面传递过来的数据的方式是:request.getParameter(“username”);这个代码可以获取到页面的username的数据.在action中可以通过属性驱动的方 ...
- WPF中Expander与ListBox(ItemsControl)嵌套中的问题
1. 当ListBox放在Expander中时,为了要实现实时更新数据的效果,这里使用了 ObservableCollection类型来作为数据源, 初始的简单例子如下:只有一个ListBox xam ...
- 一文带你入门图像分析,成为AI专家不是梦!
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由腾讯云AI中心发表于云+社区专栏 腾讯云高级研究员讲述,从成像到图像分析如何入门 文︱冀永楠 "AI来了"邀请到我 ...
- redis的数据类型(二)string类型
下面讲解value,value包括String.List.Set.Sorted Set.Hash 一.String类型 1.string类型 String是最基本的类型,而且Stirng类型是二 ...
- OpenStack 组成 架构
Components of OpenStack OpenStack is on a mission: to provide scalable, elastic cloud computing for ...
- Servlet学习系列1
一.引言: 1.什么是Servlet? JavaWeb 开发规范中的一个组成部分. 服务器端的一段小程序(代码) 2.什么是服务器?→ 安装了服务器软件的计算机. 硬件:电脑 --->高性能 ...
- grpc的数据包监控
CommView是一个专门为网络管理员,安全专家,网络程序员,以及任何想要全面了解一台个人电脑或一个网段中的网络通信量的用户设计的强大的网络监控器和分析器,不过它支持Win系统. 我这里用的 Comm ...