用到知识:
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];
};
GitHub:https://github.com/maxiaoqiang/ProgressCircle