CABasicAnimation 重复自身
我有一个在多个图层上执行的 CABasicAnimation,它所做的就是将 UIImageView 向上移动 10 像素,然后再向下移动。我希望这种情况能够无限持续下去。当动画完成后,我不知道如何让它再次播放!我知道有一个 AnimationDidStop 方法,但这并不能解决我的问题,因为我无法检测到停止移动的图层。
如何以恒定的上下动画实现 UIImageView 的动画?我尝试使用 [UIImageView beginAnimations] 等...但这些类型的动画没有计算值
I have a CABasicAnimation that I perform on multiple layers and all it does is move the UIImageView up 10 pixels and then back down. I want this to continue ad infinitum. When the animation finishes I can't figure out how to get it to do it again! I understand theres a animationDidStop method but that doesn't solve my problem because I can't detect the layer that stopped moving.
How would I achieve animating a UIImageView in a constant up and down animation? I tried with [UIImageView beginAnimations] etc... but there isn't a comulative value for those type of animations
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
然后按照通常创建动画的方式设置其余属性。设置您的repeatCount、fromValue 和toValue。
Then set the rest of the properties the way you normal would to create an animation. Set your repeatCount, fromValue, and toValue.