【发布时间】:2017-03-16 16:11:31
【问题描述】:
我已经设置了几个图像,我需要自动过渡到另一个图像,直到那时一切正常。这是我的代码:
image1 = UIImage(named: "loginBg1.png")
image2 = UIImage(named: "loginBg2.png")
images = [image1, image2]
animatedImage = UIImage.animatedImage(with: images, duration: 3)
backgroundImageView.image = animatedImage
现在的问题是,我需要它们在过渡时褪色。基本上我需要在动画之间添加一个淡入淡出过渡。
另外,如果您有经验,我想在图像中添加刻痕效果,因为它应该在转换之前和之后平移/缩放每个图像。
【问题讨论】:
标签: ios swift3 uiimage xcode8 uiviewanimation