使用CAShapeLayer实现环形进度条:LBCircleView

jopen 9年前

使用CAShapeLayer实现环形进度条。用法:

    LBCircleView *circleView = [[LBCircleView alloc] initWithFrame:CGRectMake(0, 0, 250, 250)];      circleView.center = self.view.center;      circleView.backgroundColor = [UIColor colorWithRed:255.0/255 green:157.0/255 blue:182.0/255 alpha:1.0];      [self.view addSubview:circleView];      circleView.percentColor = [UIColor colorWithRed:76.0/255 green:15.0/255 blue:77.0/255 alpha:1.0];      [circleView setProgress:0.5 animated:YES];

效果

image

项目主页:http://www.open-open.com/lib/view/home/1450188113141