UIImageView(loading...)

来源:互联网 发布:linux 红底白字 编辑:程序博客网 时间:2024/04/30 04:28

1. 调节 imageview的图片使其自适应

imageview.contentMode = UIViewContentModeScaleAspectFit;


2. 

self.tomcatImage.animationDuration = 0.1 * self.pictureArray.count;// 每张图片执行0.1

self.tomcatImage.animationImages = self.pictureArray;// 需要执行动画的图片

self.tomcatImage.animationRepeatCount = 1;// 动画重复次数(0为无限重复)

if (YES == self.tomcatImage.isAnimating) return; //如果当前正在播放动画返回


0 0