怎么办我用swift动画硬币来表明它正在旋转,使用多个图像?

时间:2015-02-07 14:23:09

标签: ios xcode swift animation

我不必是真正的3D,谢谢。我试图使用gif图像,但它不起作用,只是显示图像。

1 个答案:

答案 0 :(得分:0)

您可以使用UIImageView

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImageView_Class/index.html#//apple_ref/occ/instp/UIImageView/animationImages

// imageView is a UIImageView
// images is an array of UIImages

imageView.animationImages = images
imageView.animationDuration = 1.0
imageView.animationRepeatCount = 10
imageView.startAnimating()