pmusolino / PMSuperButton

🔥 PMSuperButton is a powerful UIButton coming from the countryside, but with super powers! 😎
MIT License
724 stars 44 forks source link

small dot comes after ripple effect completed #21

Open rahulbbit opened 4 years ago

rahulbbit commented 4 years ago

ezgif com-video-to-gif (1) This is a strange issue i am facing, after the ripple effect there comes a smaller dot.

pnzr00t commented 3 years ago

ezgif com-video-to-gif (1) This is a strange issue i am facing, after the ripple effect there comes a smaller dot.

Have same problem. Do you solve it? Can you write what you do

Alipacman commented 3 years ago

I also need resolution for this issue :( On simulator and on some devices it seems to work tho.

pnzr00t commented 3 years ago

IPhone SE emulator

I found that this bug appear when some one interrupt out animation.

For example, animation duration is 1 second, and new VC opened at 0.5 second, then animation ripple animation stopped, and you can see beginning layer, with this dot

Alipacman commented 3 years ago

IPhone SE emulator

I found that this bug appear when some one interrupt out animation.

For example, animation duration is 1 second, and new VC opened at 0.5 second, then animation ripple animation stopped, and you can see beginning layer, with this dot

Awesome! That's perfect, now I can adjust my code, thank you very much!

pnzr00t commented 3 years ago

Sorry can't post all my modify code, 4k NDA ...

Look fade.duration animation.duration and at the end of function beginTracking func

        aLayer.add(animGroup, forKey: "scale")

        DispatchQueue.main.asyncAfter(deadline: .now() + MILISECONDS_OF_ANIMATION) { [aLayer] in
            aLayer.removeAllAnimations() // it's same as animationDidStop, but call when animation fully played
        }

It's hack but work for me

mixdesign commented 1 year ago

@pnzr00t Hi, thanks. But, it doesn't work for me.

My workaround is just set aLayer.opacity = 0, because something causes ripple layer come to initial state again :), so changing the initial state to be transparent solves an issue 😁

Sajda – PMSuperButton swift 2022-11-27 23-01-46