使用CAShapeLayer實現環形進度條:LBCircleView
使用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];
效果
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!