Latest0.0.2
Homepagehttps://github.com/cyqluowang/RRCircleProgressBar
LicenseMIT
Platformsios 7.0, requires ARC
FrameworksQuartzCore
Authors

圆形进度条

  • version 0.0.1
    初始版本。

Requirements【系统要求】

  • iOS >= 7.0
  • ARC

Installation【安装】

From CocoaPods【使用CocoaPods】

pod 'RRCircleProgressBar'

How to use【使用方法】

//进度条数值(0~1.0)
@property (nonatomic) CGFloat progressValue;

//进度条颜色(默认orangeColor)
@property (nonatomic, strong) UIColor *progressBarColor;

//进度条背景色(默认lightGrayColor)
@property (nonatomic, strong) UIColor *progressBarBackgroundColor;

//进度条宽度(默认9.0)
@property (nonatomic) CGFloat progressWidth;

//设置百分比数字字体大小(默认30)
@property (nonatomic) NSInteger percentageLabelSize;

//百分比数字体颜色(默认orangeColor)
@property (nonatomic, strong) UIColor *percentageTextColor;

//百分比数字是否隐藏
@property (nonatomic) BOOL percentageTextHidden;

//百分比数字是否显示2位小数
@property (nonatomic) BOOL percentageTextIsFloat;

//年化收益百分比数字
@property (nonatomic,copy) NSString *incomeString;

//标题内容
@property (nonatomic, copy) NSString *titleString;

//多少起投
@property (nonatomic, copy) NSString *moneyString;

//期限时间
@property (nonatomic, copy) NSString *timeString;

//设置进度条数值和是否动画
- (void)setProgressValue:(CGFloat)progressValue animated:(BOOL)animated;

//设置进度条的开始和结束数值
- (void)setProgressValue:(CGFloat)progressValue animatedFromProgressValue:(CGFloat)startProgressValue;

//如果设置了incomeString、titleString、moneyString、timeString属性必须调用此方法
- (void)refreshCircularProgress;

Examples

【示例一】

    CircularProgressView *cir = [[CircularProgressView alloc] initWithFrame:CGRectMake(100, 300, 200, 200)];
    [cir setProgressValue:0.67 animated:YES];
    cir.progressWidth = 10;
    [self.view addSubview:cir];

image

【示例二】

    CircularProgressView *cir = [[CircularProgressView alloc] initWithFrame:CGRectMake(100, 300, 200, 200)];
    [cir setProgressValue:0.89 animated:YES];
    cir.progressWidth = 10;
    cir.percentageTextHidden = YES; //隐藏进度条百分比数字
    cir.titleString = @"车金融Y137444";
    cir.moneyString = @"#1000元#起投";  //#...#之间的字会改变颜色
    cir.timeString = @"期限#12#个月";
    cir.incomeString = @"13.40%"; //添加年化收益
    [cir refreshCircularProgress];  //设置了incomeString、titleString、moneyString、timeString属性必须调用此方法
    [self.view addSubview:cir];

image

Contact 联系方式

基于上述版本修改

https://github.com/mangofever/CircularProgressView

Latest podspec

{
    "name": "RRCircleProgressBar",
    "version": "0.0.2",
    "summary": "u5706u5f62u7cbeu5ea6u6761.",
    "description": "u4ec1u6da6u5706u5f62u7cbeu5ea6u6761",
    "homepage": "https://github.com/cyqluowang/RRCircleProgressBar",
    "license": "MIT",
    "authors": {
        "u674eu5cf0u5065": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/cyqluowang/RRCircleProgressBar.git",
        "tag": "0.0.2"
    },
    "source_files": "Core/*",
    "requires_arc": true,
    "frameworks": "QuartzCore"
}

Pin It on Pinterest

Share This