YJWaveProgressView
一款圆形水波进度控件,高度可定制开发,支持自动布局
Demo
Installation
- Installation with CocoaPods:
pod 'YJWaveProgressView'
- Manual import:
- Drag All files in the
YJWaveProgressView
folder to project - Import the main file:
#import "YJWaveProgressView.h"
- Drag All files in the
Usage
✨✨ 支持自动布局 ✨✨
YJWaveProgressView *waveView = [[YJWaveProgressView alloc]init];
// 设置水波颜色
waveView.waterColor = [UIColor colorWithRed:107/255.0 green:194/255.0 blue:53/255.0 alpha:1];
// 设置水波背景颜色
waveView.waterBgColor = [UIColor colorWithRed:107/255.0 green:194/255.0 blue:53/255.0 alpha:0.6];
// 设置描述文字
waveView.descriptionText = @"汽车当前电量";
// 显示刻度
waveView.showScale = YES;
// 时钟刻度样式
waveView.scaleStyle = YJWaveScaleStyle_Clock;
// 允许重力感应
waveView.allowCoreMotion = YES;
// 设置进度
waveView.progress = 0.8;
[self.view addSubview:waveView];
[waveView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.equalTo(self.view);
make.size.mas_equalTo(CGSizeMake(300, 300));
}];
Update
- 2018.12.10 添加新功能:新增刻度盘显示、支持重力感应
Remind
- ARC
- iOS>=8.0
- iPhone \ iPad screen anyway
Contact me
- Email: jellybilly@foxmail.com
License
YJWaveProgressView is available under the MIT license. See the LICENSE file for more info.