Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added two more corner rounding types (top corners only & bottom corners only), and ability to pass custom animation duration. #36

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

MussaCharles
Copy link

This PR introduces the following new features & bug fixes

  • New Features*
  1. I have added two more enum cases on GTProgressBarCornerType which are GTProgressBarCornerType.topCornersOnly and GTProgressBarCornerType.bottomCornersOnly

These will have the following effects.

Corner roundings

  1. 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.

@gregttn
Copy link
Owner

gregttn commented Jun 4, 2021

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.

@MussaCharles
Copy link
Author

Hi @gregttn , thanks for reviewing :) Sure, I will upate README to include new changes and let you know soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants