• [翻译] KYCircularProgress


    KYCircularProgress

    Flexible progress bar written in Swift.

    用Swift语言编写的灵活的进度条控件。

    Features

    • Gradation Color 渐变的颜色
    • Progress Closure 进度渐变
    • UIBezierPath Progress Bar 支持贝塞尔曲线

    Demo

    Requirement

    • iOS7.0+
    • Xcode6.0.1+

    Usage 使用

    Create KYCircularProgress 创建KYCircularProgress

    var circularProgress: KYCircularProgress! = KYCircularProgress(frame: self.view.bounds)

    Gradation Color 渐变的颜色

    // support Hex color to RGB color
    circularProgress.colors = [0xA6E39D, 0xAEC1E3, 0xE1A5CB, 0xF3C0AB]

    Progress Closure 实时进度

    circularProgress.progressChangedClosure({ (progress: Double, circularView: KYCircularProgress) in
        println("progress: (progress)")
    })

    UIBezierPath Progress Bar 贝塞尔曲线的bar

    // create "Star progress bar"
    let path = UIBezierPath()
    path.moveToPoint(CGPointMake(50.0, 2.0))
    path.addLineToPoint(CGPointMake(84.0, 86.0))
    path.addLineToPoint(CGPointMake(6.0, 33.0))
    path.addLineToPoint(CGPointMake(96.0, 33.0))
    path.addLineToPoint(CGPointMake(17.0, 86.0))
    path.closePath()
    circularProgress.path = path

    Installation 安装

    1. Add KYCircularProgress.swift in your project. 将KYCircularProgress.swift添加到你的项目当中即可
  • 相关阅读:
    sql server 查询数据判断为空
    sql 排序
    ASP.NE 上传文件控件
    JQ 获取下一个元素和获取下一个元素的[指定]子元素
    sql server 查询时间 格式化输出
    ASP.NET 页面验证cookie
    ASP.NET MD5加密
    HTML编辑器ASP.NET
    Repeater控件
    20150215-情愿
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4138901.html
Copyright © 2020-2023  润新知