【发布时间】:2017-05-08 05:54:15
【问题描述】:
我遇到的一个快速问题是为我当前的应用程序设置动画移动背景图像。本质上,我想让我当前静止的背景图像在我的视图中从左到右无休止地滚动;但我正在努力将它们拼凑在一起。从各种其他来源,我组成了这个目前不起作用的功能,我真的无法弄清楚如何或为什么。
func animate(_ image: UIImageView) {
UIView.animate(withDuration: 5, delay: 0, options: .curveLinear, animations: {
image.transform = CGAffineTransform(translationX: -100, y: 0)
}) { (success: Bool) in
image.transform = CGAffineTransform.identity
self.animate(image)
}
}
非常感谢任何帮助/协助!
【问题讨论】:
-
你需要什么样的动画?解释清楚
-
对不起,不够清晰!我希望我的动画是这样的; cdn.dribbble.com/users/279765/screenshots/1335470/…
标签: ios swift xcode swift3 uiimageview