问题
Okay...this is a long shot. Here's goes...
Background:
For a long time, I've been trying to figure out how to animate a wave horizontally across the screen while a long press is active. When the long press is interrupted or ends, the wave pauses in place, while continuing to ripple.
I've struggled to find a way to implement this. And then I recently stumbled across BAFluidView. I was able to get the wave looking as I'd like it to:
The wave animates nicely. I can control when it starts. But, I can't pause it's motion across the screen while allowing the actual wave to continue.
About me:- I'm new to this.
- I don't know much (almost none) Objective-C
- The library was written in Objective-C
Does anyone see a way for me to pause this damn wave?
If not here, what am I missing that could make this so much easier?
Here's a link to the repo containing BAFluidView's code.
And here's a link to the wave shown below. It's not the app I'm working on, but it's an attempt to figure out how to pause this wave.
Thanks!
回答1:
I think pause animation is not possible but you remove current on going animation with below method.
[myView.layer removeAllAnimations];
来源:https://stackoverflow.com/questions/53074714/pausing-one-animation-while-keeping-another-bafluidview-swift