Pausing one animation while keeping another — BAFluidView Swift

試著忘記壹切 提交于 2021-01-27 19:25:30

问题


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:
  1. I'm new to this.
  2. I don't know much (almost none) Objective-C
  3. The library was written in Objective-C
My ask:

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!