[翻译] 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 ...
随机推荐
- shiro学习笔记_0500_授权
1,授权:给身份认证通过的人,授予他可以访问某些资源的权限. 2,权限粒度:分为粗粒度和细粒度. 粗粒度:例如对 user 的 crud,也就是通常所说的对表的操作. 细粒度:对表中记录的操作.如 只 ...
- 基于angularJS的表单验证练习
今天看了一下angularJS的表单验证,看的有点云里雾里(也有可能是雾霾吸多了),于是做了一个小练习来巩固一下. html: <div ng-controller="Aaa" ...
- jmeter笔记
Jmeter性能测试 入门 Jmeter 录制脚本:使用一个叫badbody的工具录制脚步供jmeter使用,http://www.badboy.com.au/:也可以用jmeter来录制 Jmete ...
- jgGrid注销表格(动态修改表头)以及前台分页
实例代码 <!doctype html> <html lang="en"> <head> <meta charset="UTF- ...
- Hadoop Metrics2
来源:Hadoop Metrics2 Metrics are collections of information about Hadoop daemons, events and measureme ...
- 16G的U盘 4G的压缩
文件系统格式原因,或是你的U盘是扩容盘(就是实际容量和显示的不一样)常用文件系统支持的单个文件大小: FAT16 支持单个文件最大不超过2GB FAT32 支持单个文件最大不超过4GB(有人说实际超过 ...
- A GDB Tutorial with Examples--转
http://www.cprogramming.com/gdb.html A GDB Tutorial with Examples By Manasij Mukherjee A good debugg ...
- 单独烧录kernel
使用fastboot: adb reboot bootloader //adb 进入BootLoader(fastboot是BootLoader的命令) fastboot flash boot boo ...
- i.mx android6 输入子系统分析(未完)
参考:http://blog.csdn.net/u010312937/article/details/53285286 https://www.jianshu.com/p/7fca94b330ea ...
- Rsyslog+ELK日志分析系统
转自:https://www.cnblogs.com/itworks/p/7272740.html Rsyslog+ELK日志分析系统搭建总结1.0(测试环境) 因为工作需求,最近在搭建日志分析系统, ...