VHProgressBar 1.0.2

VHProgressBar 1.0.2

Sohei Miyakura维护。



VHProgressBar

VHProgressBar是垂直和水平动画进度条。

progressTest1 progressTest2

安装

Cocoapods

将此代码添加到您的Podfile

pod 'VHProgressBar', '~> 1.0'

安装到您的项目中

$ pod install

使用

使用Swift进行编码

//import UIKit and VHProgressBar
import UIKit
import VHProgressBar

 // vertical progress bar
var verticalProgressBar: VerticalProgressBar!
// horizontal progress bar
var horizontalProgressBar: HorizontalProgressBar!


// start simple animation
verticalProgressBar.animateProgress(duration: 2.0, progressValue: 0.7)
horizontalProgressBar.animateProgress(duration: 3.0, progressValue: 0.2)

// start repeat animation
// you can choose type "normal" or "reverse"
verticalProgressBar.startAnimation(type: "normal", duration: 3.0)
//stop repeat animation  
verticalProgressBar.stopAnimation()

使用Storyboard

在Storyboard中将UIView拖放到你的viewController中,并将类设置为VerticalProgressBarHorizontalProgressBar

storyboard1

通过在Interface Builder中设置属性来自定义进度条。

storyboard2

支持的属性

属性 描述
背景颜色 进度条背景颜色
条颜色 进度条颜色
边框颜色 边框颜色
边框加粗 边框宽度
PG高度 进度条高度
PG宽度 进度条宽度

贡献

欢迎贡献!

版本

1.0

作者

宫脇翔平(miyass)