暂停一个动画,同时保留另一个动画— BAFluidView Swift [英] Pausing one animation while keeping another — BAFluidView Swift
问题描述
好吧...这是一个远景.走了...
背景:
很长一段时间以来,我一直在试图找出如何在长按激活状态下在屏幕上水平显示波浪动画.当长按中断或结束时,波浪会暂停原位,同时继续波动.
我一直在努力寻找一种方法来实现这一目标.然后我最近偶然发现了
波浪动画效果很好.我可以控制何时开始.但是,我不能在允许实际波浪继续进行的同时暂停它在屏幕上的运动.
关于我:- 我是新来的.
- 我不太了解(几乎没有)Objective-C
- 该库是用Objective-C编写的
我的要求:
有人能帮我暂停这该死的浪潮吗?
如果不在这里,我想念的是什么可以使事情变得如此简单?
这是指向下面显示的wave的链接.这不是我正在开发的应用程序,而是试图弄清楚如何暂停这波浪潮.
谢谢!
我认为无法执行暂停动画,但是您可以使用以下方法删除当前播放的动画.
[myView.layer removeAllAnimations];
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
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!
I think pause animation is not possible but you remove current on going animation with below method.
[myView.layer removeAllAnimations];
这篇关于暂停一个动画,同时保留另一个动画— BAFluidView Swift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!