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
Zachary Baker
614 PointsProblem trying to Set the 'robotImages' to the animation images property of 'imageView'
As the title suggests i cant finish this task. A little push in the right direction syntactically is what i need and im hoping one of you could help me out. Here is my code so far...
UIImage *image = [UIImage imageNamed:@"robot.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
NSArray *robotImages = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"Robot1"], [UIImage imageNamed:@"Robot2"], [UIImage imageNamed:@"Robot3"],[UIImage imageNamed:@"Robot4"],
nil];
self.imageView.animationImages = robotImages;
The last line is what is causing the error and the tips arent helping. Thanks if you can help!
4 Answers
J.T. Gralka
20,126 PointsZachary,
Your code looks okay, assuming you placed it in the proper method. Is there any way you could upload your project to DropBox? I wouldn't mind taking a look to see if anything looks out of whack.
Cheers,
J.T.
Edit:
It might also help if you took a screenshot of the question directly from the code challenge, or if you copied and pasted the question verbatim, as I haven't done that particular badge on Treehouse.
ecp
838 PointsHey @Zachary!
I hope J.T.'s suggestions helped you some. We definitely could use some more detail. Could you link us to the Code Challenge and perhaps an example of your working code as it appears in the Code Challenge? You could link the Treehouse Team and Students to a JSfiddle or Codepen account. That'd help a lot :D
JSfiddle - http://jsfiddle.net/ Codepen - http://codepen.io/
Also, don't hesitate to email the Treehouse team directly! We're always here for you: help@teamtreehouse.com
Amit Bijlani
Treehouse Guest Teacher@Zachary
The last line should simply be:
imageView.animationImages = robotImages;
You shouldn't be prefixing it with self because imageView is not a @property it is simply an instance variable.
Zachary Baker
614 Points@Amit Thank you this solved the problem!