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
Matt Dooley
4,192 PointsImage Based Animation Challenge #3
"Instruct your 'imageView' to start running the animation."
What's wrong? I Can't pass this challenge and I can not find an answer in the forum.
#import "THViewController.h"
@implementation THViewController
- (void)viewDidLoad { [super viewDidLoad]; [self.imageView startAnimation];
self.imageView.animationImages = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"01"], [UIImage imageNamed:@"02"], [UIImage imageNamed:@"03"], nil];
self.imageView.animationDuration = 5.0f;
}
@end
2 Answers
Amit Bijlani
Treehouse Guest TeacherGlad you figured it out
Ihosvany Diaz
2,946 Pointsthe answer is [self.imageView startAnimating]; just have to fix Animation for Animating.
Matt Dooley
4,192 PointsMatt Dooley
4,192 PointsSolved It. Put animation code in the wrong area.
import "THViewController.h"
@implementation THViewController
(void)viewDidLoad { [super viewDidLoad];
self.imageView.animationImages = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"01"], [UIImage imageNamed:@"02"], [UIImage imageNamed:@"03"], nil];
self.imageView.animationDuration = 5.0f; [self.imageView startAnimation];