2015-02-07 34 views

回答

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() 
+0

imageView.animationImages = [3039651.png,3039668.png] imageView.animationDuration = 1.0 imageView.animationRepeatCount = 10 imageView.startAnimating() – 2015-02-07 14:49:06

+0

这是正确使用客观的c代码苹果文档 – 2015-02-07 14:49:51

+0

'图像'是一个'UIImage'的数组。例如'let image = UIImage(命名为:“3039651”)!'。很显然,对于许多图像来说,数组最好在循环中填充。 – Simple99 2015-02-07 15:01:24