How to animate images in Swift? [duplicate]
问题 This question already has answers here : In Xcode 6.1. 'UIImage?' does not have a member named 'size' Error (4 answers) Closed 6 years ago . I have updated to last version of xcode with ios 8.1 sdk and I get an error ion declaration of my function in: @IBOutlet weak var imageAnimation: UIImageView! imageAnimation.animationImages = [ UIImage(named: "5.png"), UIImage(named: "4.png"), UIImage(named: "3.png"), UIImage(named: "2.png"), UIImage(named: "1.png") ] The error is: 'Type UIImage? does