[翻译] EAColourfulProgressView
EAColourfulProgressView

效果:

EAColourfulProgressView is a custom progress view where the current filling colour is generated between two colours, based on the current value.
It takes advantages of IBDesignable and IBInspectable so that you can completely customize with without leaving the Interface Builder:
EAColourfulProgressView是一个定制的进度条view,其进度当中的颜色介于两个颜色之间,当前颜色值由当前值决定。
它使用了IBDesignable与IBInspectable,所以,你可以完全的定制他,不用IB也行:

It gives you the possibility to update the current value by calling:
你可以使用如下的方法来实时更新颜色值:
/**
* This method updates the current value to the given one. It can
* animate the progress view filling size, as well as the background
* color change, if 'animated' is YES.
*
* @param currentValue The new current value to be used.
* @param animated BOOL with YES if the update should be animated, NO otherwise.
*/
- (void)updateToCurrentValue:(NSInteger)currentValue animated:(BOOL)animated;
Installation Cocoapods
Add this in your Podfile
pod 'EAColourfulProgressView', '~> 0.1.0'
Usage
Set the Custom Class of a UIView to EAColourfulProgressView in Interface Builder, customize the available variables and see them being live rendered ;)
在IB中,你将UIVIew的子类设置成EAColourfulProgressView,定制一下属性,然后就会像上图中显示的那样子了:)
Future improvements
- Any number of segments 任意数量的分段显示
- Segment separators (loading like progress view) 分段显示风格(看起来像真正的进度条)
- Performance improvements 改进
[翻译] EAColourfulProgressView的更多相关文章
- 《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 ...
随机推荐
- linux 下 vi 编辑器 使用
命令模式(command mode).插入模式(Insert mode)和底行模式(last line mode) 1.进入插入模式 按「i」切换进入插入模式「insert mode」,按“i”进入插 ...
- linux mint 18.2 安装wireshark
Method 1: Via PPA Step 1: Add the official PPA sudo add-apt-repository ppa:wireshark-dev/stable Step ...
- 【LESS系列】内置函数说明
本文转自 http://www.cnblogs.com/zfc2201/p/3493335.html escape(@string); // 通过 URL-encoding 编码字符串 e(@stri ...
- TensorFlow架构与设计:概述
TensorFlow是什么? TensorFlow基于数据流图,用于大规模分布式数值计算的开源框架.节点表示某种抽象的计算,边表示节点之间相互联系的张量. TensorFlow支持各种异构的平台,支持 ...
- Linux Directory Structure
Note: Files are grouped according to purpose. Ex: commands, data files, documentation. Parts of a Un ...
- ORA-04091: table xxx is mutating, trigger/function may not see it
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 Connected as tbcs SQL> SQL ...
- 有关索引的DMV
转自:http://www.cnblogs.com/CareySon/archive/2012/05/17/2505981.html#commentform 有关索引的DMV 1.查看那些被大量更新, ...
- [PY3]——字符串的分割、匹配、搜索方法总结
?分割.匹配.搜索时可以用到什么样的解决方法? 分割方法总结 1. str.split( ) * 分割字符串 * 返回列表 s1='I love python' # 默认以空格为界定符,且多个空格都当 ...
- Apache mod_rewrite
mod_rewrite是Apache的一个非常强大的功能,它可以实现伪静态页面.下面我详细说说它的使用方法!对初学者很有用的哦! 1.检测Apache是否支持mod_rewrite phpinfo() ...
- jQuery事件篇---事件对象
内容提纲: 1.事件对象 2.冒泡和默认行为 发文不易,转载请注明出处! JavaScript 在事件处理函数中默认传递了 event 对象,也就是事件对象.但由于浏览器的兼容性,开发者总是会做兼容方 ...