Hello guys,
I have an animation that is 129 frames and I use the UIImageView animation function:
Code:
-(void)initBackground{
backgroundArray = [[NSArray alloc] initWithObjects:
[UIImage imageNamed:@"1 001.png"],
[UIImage imageNamed:@"1 002.png"],
[UIImage imageNamed:@"1 003.png"],
[UIImage imageNamed:@"1 004.png"],
[UIImage imageNamed:@"1 005.png"],
[UIImage imageNamed:@"1 006.png"],
[UIImage imageNamed:@"1 007.png"],
...................................................
[UIImage imageNamed:@"1 129.png"],
nil];
background.animationImages = backgroundArray;
background.animationDuration = 6;
background.animationRepeatCount = 1;
background.contentMode = UIViewContentModeBottomLeft;
[background startAnimating];
}
I call this function from viewDidLoad using [self initBackground]; and I don't get warnings. But when I hit the button to start this class, It lags for so long that the animation is actually not viewed. Please help!
P.S. the long series of dots is just skipping me adding the rest of the frames