kentya6 / KYCircularProgress

Flexible progress bar written in Swift.
MIT License
1.15k stars 115 forks source link

CircularProgress.startAngle doesn't take effect #24

Closed objcCodingTogether closed 6 years ago

objcCodingTogether commented 6 years ago

Hi ,

I just want the animation start from the top of the circle. So I set the startAngle as -Double.pi / 2 , but it still start from 0 . Is there anything I missed?

Here is my code : @IBAction func runAction(_ sender: Any) { productACircularProgress.colors = [.purple, UIColor(rgba: 0xFFF77 A55), .orange] productACircularProgress.startAngle = -Double.pi / 2 productACircularProgress.set(progress: 0.618, duration: 0.75) }

Thanks in advance!

kentya6 commented 6 years ago

Hi, @objcCodingTogether

I found that change of startAngle is not valid, so I'll fix properties of startAngle and endAngle this week. If you want to fix it in the current state, please replace the current path to new path(assign the new startAngle), or rotated CircularProgress using CGAffine.

kentya6 commented 6 years ago

@objcCodingTogether

I updated to library version 1.2.0. It added strokeStart / End property, and can set progress offset. Although it may be enough by CGAffineTransform this time.

Thanks.