Reputation: 1
Here is my code for reference. It's just one error:
{ /*** Expected identifier or '(' ***/
sunanimation.animationImages = [NSArray arrayWithObjects:[UIImage imagedNamed:@"Sun 1.png"],
[UIImage imagedNamed:@"Sun 2.png"],
[UIImage imagedNamed:@"Sun 3.png"],
[UIImage imagedNamed:@"Sun 4.png"],
[UIImage imagedNamed:@"Sun 5.png"],
[UIImage imagedNamed:@"Sun 6.png"], nil];
//always need nil
[sunanimation setAnimationRepeatCount:90];
//how many times it repeats
[sunanimation setAnimationDuration:0.5];
//how many seconds each animation lasts
[sunanimation startAnimating];
//begins the animation
}
Upvotes: 0
Views: 111
Reputation: 5667
You got a Typo man. The problem is imagedNamed
, a wrong keyword.
Kindly use [UIImage imageNamed:@"Sun 1.png"]
Upvotes: 1