I've got a UIImageView whose image
property is set to an image which corresponds to the first frame of an animation. At some point, the user performs a touch and the animation starts playing. However, I've noticed a "blink" in the UIImageView when the animation first starts. I discovered that what is happening is that when I call startAnimating
the UIImageView removes the image
in its image property (leaving the background color) so that it can fade in the first frame of the animation BEFORE the animation starts playing.
I do not want it to "fade in" the first frame; the first frame is already there. I don't care if it takes a split second to start playing the animation, but the "fade in" for the first frame is causing the unwanted blink. How can I keep it from "fading in" that first frame?
Thanks,
In viewDidLoad
...
self.animationView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"frame0"],
[UIImage imageNamed:@"frame1"],
[UIImage imageNamed:@"frame2"],
[UIImage imageNamed:@"frame3"],
[UIImage imageNamed:@"frame4"],
[UIImage imageNamed:@"frame5"], (etc..)
nil];
self.animationView.animationDuration = 0.25;
self.animationView.animationRepeatCount = 1;
Later on...
[self.animationView startAnimating];