Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Simple iPhone App (iOS7) Animating and Intercepting Events Image Based Animation

Animating and Intercpeting Events

Here's challenge #3:

Instruct your 'imageView' to start running the animation.

Here's my code for #1 and #2:

self.imageView.animationImages = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"01"], [UIImage imageNamed:@"02"], [UIImage imageNamed:@"03"], nil];
self.imageView.animationDuration = 5.0f;

The code I've tried so far for #3 is:

self.imageView.startAnimating;

and

[self.imageView startAnimating];

Please help!

2 Answers

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Hello Joey,

I tried using your second line and passed the challenge. Please try it again and let me know if it works for you.

Your answer is what I used below.

self.imageView.animationImages = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"01"], [UIImage imageNamed:@"02"], [UIImage imageNamed:@"03"], nil];
self.imageView.animationDuration = 5.0f;
[self.imageView startAnimating];

I hope this helps.

Weird. I tried it again and this time it worked. Thanks bud!