I'm trying to animate a UIImageView with a series of images using animationImages
when a button is tapped. The animation works but I want the last image to remain when the animation completes. I tried creating another UIImageView and unhiding it, but it shows up even before the animation starts.
@IBAction func mave(sender: AnyObject) {
window.hidden = false
window.animationImages = imagelist
window.animationDuration = 1.0
window.animationRepeatCount = 1
window.startAnimating()
if window.isAnimating() {
frost.hidden = true
} else {
frost.hidden = false
}
}
哦,您只需要在开始动画之前预先将ImageView加载为最终图像即可!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.