ios png序列动画

今天做png 序列动画, 记录下

1
2
3
4
5
6
7
8
9
10
11
12
13
var images_1 = [UIImage]()
for i in 1 ... 60{
let image = UIImage(named: "imageName\(i)")
images_1.append(image!)
}
var imageView = UIImageView(frame: frame)
imageView.animationImages = images_1
imageView.animationDuration = 3//一次动画时间
imageView.animationRepeatCount = 0//次数,0为一直播放
imageView.startAnimating()
//开始 stop 停止
self.view.addSubview(imageView)
Author

陈昭

Posted on

2016-09-19

Updated on

2021-12-27

Licensed under

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

Kommentare

You forgot to set the shortname for Disqus. Please set it in _config.yml.