var images = [UIImage]()
for i in 1...perc.integerValue
{
var temp : String = ""
let a :NSNumber = i
temp="Percentages"+a.stringValue+".png"
images.append(UIImage(named: temp)!)
}
imgView.animationImages = images
imgView.animationRepeatCount = 1
imgView.animationDuration = 2
imgView.startAnimating()
方法animationRepeatCount无效。我跑步时不会显示图像。