So I want to animate a UIImageView on a load screen and I've been told that the built in "animationImages" method takes up a lot of memory and is bad programming so I won't use that, I also had issues with it but that's besides the point.
The code below almost works but it animates through way too fast even though I put 3 seconds.
func animate() {
UIView.animateWithDuration(3, animations: { () -> Void in
self.logoImageView.image = UIImage(named: "00")
self.logoImageView.image = UIImage(named: "02")
self.logoImageView.image = UIImage(named: "03")
self.logoImageView.image = UIImage(named: "04")
self.logoImageView.image = UIImage(named: "05")
self.logoImageView.image = UIImage(named: "06")
self.logoImageView.image = UIImage(named: "07")
self.logoImageView.image = UIImage(named: "08")
self.logoImageView.image = UIImage(named: "09")
self.logoImageView.image = UIImage(named: "10")
self.logoImageView.image = UIImage(named: "11")
self.logoImageView.image = UIImage(named: "12")
self.logoImageView.image = UIImage(named: "13")
self.logoImageView.image = UIImage(named: "14")
self.logoImageView.image = UIImage(named: "15")
self.logoImageView.image = UIImage(named: "16")
self.logoImageView.image = UIImage(named: "17")
self.logoImageView.image = UIImage(named: "18")
self.logoImageView.image = UIImage(named: "19")
self.logoImageView.image = UIImage(named: "20")
self.logoImageView.image = UIImage(named: "21")
self.logoImageView.image = UIImage(named: "22")
self.logoImageView.image = UIImage(named: "23")
self.logoImageView.image = UIImage(named: "24")
self.logoImageView.image = UIImage(named: "25")
self.logoImageView.image = UIImage(named: "26")
}) { (success) -> Void in
self.fadeInLabel()
}
However, the code below here fades in the welcome label and works just fine so I wonder what the issue with the above is. Thanks for the help!
func fadeInLabel() {
UIView.animateWithDuration(2, animations: { () -> Void in
self.labelImageView.alpha = 1
}) { (success) -> Void in
self.performSelector("pushToCreateVC", withObject: self, afterDelay: 1)
}
}