I have two animation sequences, and I want one of them to play randomly when a button is pressed. Here is the code:
{
color.animationImages = [NSArray arrayWithObjects:
[UIImage imageName: @"1.gif"],
[UIImage imageName: @"2.gif"],
[UIImage imageName: @"3.gif"],
[UIImage imageName: @"4.gif"],
[UIImage imageName: @"5.gif"],
[UIImage imageName: @"6.gif"],
[UIImage imageName: @"7.gif"], nil];
[color setAnimationRepeatCount:0];
color.animationDuration = 3;
[color startAnimation];
}
I don t know how to do the code for this. So if anyone knows please tell me! Thank you!