GTProgressBar icon indicating copy to clipboard operation
GTProgressBar copied to clipboard

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

Open MussaCharles opened this issue 3 years ago • 2 comments

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.

MussaCharles avatar May 26 '21 05:05 MussaCharles

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.

gregttn avatar Jun 04 '21 15:06 gregttn

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

MussaCharles avatar Jun 04 '21 18:06 MussaCharles