zoukankan      html  css  js  c++  java
  • [翻译] 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 改进
  • 相关阅读:
    C++中的乱七八糟问题
    在Win环境下配置java的环境进行开发步骤
    常用软件破解
    关于QT建立项目中遇到的相关问题的处理办法
    QT5.4.0安装以及与VS2010整合安装---64bit操作系统解决方案
    STL容器之一vector
    STL
    三种初步简易的方法求解数值问题 of C++
    Visual Studio 简单使用常识操作
    江城感怀---诗一首
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4109828.html
Copyright © 2011-2022 走看看