ZProgress 1.0.2

ZProgress 1.0.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2017年3月

zhuayi 维护。




ZProgress 1.0.2

  • 作者:
  • zhuayi

使用说明

ZProgress 是一款非常方便的自定义进度条控件

要运行示例项目,请克隆仓库,并首先从 Example 目录运行 pod install

样式

进度条类型

typedef NS_ENUM(NSInteger, ZProgressType) {
// 圆形进度条
ScrollToRound,
// 进度条, X 轴滑行
ScrollToX,
// 进度条, Y 轴滑行
ScrollToY
};

进度条类型

@property (nonatomic, assign) ZProgressType zprogressType;

进度条宽度,水平滚动时为高度。

@property (nonatomic, assign) CGFloat progressWidth;

进度条颜色

@property (nonatomic, strong) UIColor *progressColor;

进度条背景色

@property(nonatomic, strong) UIColor *trackTintColor;

示例

ZProgressView *roundProgessView = [[ZProgressView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 64)];
[roundProgessView setProgress:30 / 100.0 animated:YES duration:1.2]; // 动画
roundProgessView.delegate = self; // 代理
roundProgessView.style.progressWidth = 50.0; // 进度条宽度
roundProgessView.style.zprogressType = ScrollToX; // 滚动方向
roundProgessView.style.progressColor = [UIColor redColor];  // 进度条颜色值
roundProgessView.style.trackTintColor = [UIColor greenColor]; // 进度条背景色
roundProgessView.backgroundColor = [UIColor grayColor];
[self.view addSubview:roundProgessView];

安装

ZProgress 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile

pod "ZProgress"

作者

zhuayi, [email protected]

许可证

ZProgress 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。