GTProgressBar
GTProgressBar copied to clipboard
Added two more corner rounding types (top corners only & bottom corners only), and ability to pass custom animation duration.
This PR introduces the following new features & bug fixes
- New Features*
- I have added two more enum cases on
GTProgressBarCornerType
which areGTProgressBarCornerType.topCornersOnly and GTProgressBarCornerType.bottomCornersOnly
These will have the following effects.
- I have also added ability to pass a custom duration animation when calling animate method like so: -
progressBar.animateTo(progress: progress,duration: 0.4)
Bug Fixes
Additionally I have also edited the corner radius section original view.frame.height / 2 * 0.7
changed to ---> view.frame.height / 2
, The reason is because the corner radius was not a smooth curve as expected when you halve the height or width.
Was there a reasoning behind to why 0.7 was multiplied that I missed? If not then I think getting rid of that 0.7 fixes a bug.
PS: - I am currently using this fork on our app with no issues, if there is something off please let me know.
Hi @MussaCharles, this looks awesome! Thanks! Could you please update the README with the new settings before I merge it in? I will release a new version shortly after.
With regards to the corner radius I no longer remember why I multiplied it by 0.7, I'm sure there was a reason but since I don't remember I'm ok accepting your change.
Hi @gregttn , thanks for reviewing :) Sure, I will upate README to include new changes and let you know soon.