CustomizableActionSheet icon indicating copy to clipboard operation
CustomizableActionSheet copied to clipboard

Fix animation

Open yccheok opened this issue 3 years ago • 0 comments

Hi Beryu,

I would like to propose a fix on animation.

The problem will become more obvious, if I increase the height of custom view, and make the animation time longer.

Here's the video before the proposed fix, and after the proposed fix.

The idea of the fix is, the delta Y animation should be the height of the bottom sheet, not the y-position of bottom sheet

Before

https://user-images.githubusercontent.com/308276/104816277-14d68680-5855-11eb-947e-7b93173541f5.mov

After

https://user-images.githubusercontent.com/308276/104816287-291a8380-5855-11eb-9756-679ed72967a4.mov

At the same time, I am also proposing adding self.itemContainerView.transform = CGAffineTransform.identity before setting frame. This enables us to clear off the transform from dismiss(), if we are re-using this CustomizableActionSheet

Thank you very much.

yccheok avatar Jan 16 '21 15:01 yccheok