AladinWay / TransitionButton

UIButton sublass for loading and transition animation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The button doesn't fill the full screen size

volkoivan opened this issue · comments

You can see at the image the size of the button once it finished it's stop animation.

2018-04-02 15 45 56

Here it's original layout:
2018-04-02 15 47 55

Is it me doing something wrong, or is it the problem with the library?

Thank you for reporting the issue. Can you reproduce it in the example project ? which device/simulator did you use for testing ?

Simulator iPhone8 Plus
To reproduce it remove the leading constraint of the button so it becomes a circle
Then you'll notice a gap on the left top corner after stopLoading call

@megavirus74 in file TransitionButton.swift line 190 you can increase the expand value:
expandAnim.toValue = 26.0
Maybe It should be an optional property when choosing expand animation or a button property. I will think about that and update the library if needed. Note that usually while expanding you will have a fade animation of the next screen, so it should not be a problem if the button does not expand fully, but that depends of the user needs, I may update add it as property. Thank you for reporting and using the library.

I'm using it as a pod, so changing it in code will be a little messy, but okay if there is no workaround for now
Maybe make it based on the button position and size compared to view size?
Anyway, thanks for help!

@megavirus74 It's fixed now, sorry for the delay. It will be included in the next release.