离散进度图层绘制以及点击

用到知识:

1、贝塞尔曲线

2、​绘图

用法

CGFloat width = [UIScreenmainScreen].bounds.size.width;

XQCircleView *circle = [[XQCircleView alloc] initWithFrame:CGRectMake(20, 100, width - 40, width - 40)];

circle.dataArray = @[@0.2,@0.2,@0.1,@0.3,@0.2];

circle.circleWidth = 40.0f;

circle.progress = 0.1;

circle.mainColor = [UIColor greenColor];

circle.secondaryColor = [UIColorlightGrayColor];

circle.selectedNum = ^(NSInteger number){

self.clickLabel.text = [NSStringstringWithFormat:@"点击了%ld个分块",number];

};


离散进度图层绘制以及点击_第1张图片

GitHub:https://github.com/maxiaoqiang/ProgressCircle

你可能感兴趣的:(离散进度图层绘制以及点击)