IOS and ios

Source: Internet
Author: User

IOS and ios

Due to the needs of the new project, we need to draw a circular chart. Since we have never touched this kind of project before (I am a cainiao), I found a case in cocochina. I think it is okay to share it.

Github address https://github.com/zhouxing5311/ZZCircleProgress

 

 

This is very simple to use.

The author opens many interfaces that can be changed as needed.

It's okay to declare a tired class.

The specific implementation code is as follows:

 

Maybe my code is a little different. I added some elements myself.

// No small dots, same animation time self. zzCircleProgress = [[ZZCircleProgress alloc] Progress: CGRectMake (JdryScreeWidth * 0.75) + 9, 16, 50, 50) pathBackColor: BACK_COLOR pathFillColor: BLUE_COLOR startAngle: 270 strokeWidth: 4]; self. zzCircleProgress. showPoint = NO; self. zzCircleProgress. notAnimated = YES; self. zzCircleProgress. progress = 0.9; self. zzCircleProgress. fontSize = 16.0; // self. zzCircleProgress. animationModel = CircleIncreaseByProgress; self. zzCircleProgress. textColor = BLUE_COLOR; self. zzCircleProgress. labelStr = [NSString stringWithFormat: @ "% d %", (int) (self. zzCircleProgress. progress * 100)]; [self addSubview: self. zzCircleProgress];

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.