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

作者: 逗你玩之豆豆豆 | 来源:发表于2016-09-07 18:12 被阅读26次

    用到知识:

    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

    相关文章

      网友评论

        本文标题:离散进度图层绘制以及点击

        本文链接:https://www.haomeiwen.com/subject/rkojettx.html