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
George S-T
6,624 PointsUITableViewCell with an Image Code Challenge
Can't seem to get it right on the second part of the challenge. Stuff Ive tried:
'cell.imageview.image = [imageNamed:@"placeholder.png"];' 'cell.imageview.image = @"placeholder.png";' 'cell.imageview.image = image;'
I got the first part of the challenge correct. Thanks.
1 Answer
Stone Preston
42,016 Pointsyou are supposed to use the UIImage object you created in the first part of the challenge as the image for the cell imageView (which it looks like is one the things you tried). However you misspelled imageView as imageview.
Below is the correct code
UIImage *image = [UIImage imageNamed:@"placeholder.png"];
cell.imageView.image = image;
whereas you had (notice that you did not capitalize the v in imageview)
UIImage *image = [UIImage imageNamed:@"placeholder.png"];
cell.imageview.image = image;
George S-T
6,624 PointsGeorge S-T
6,624 PointsTurns out I jotted it down with a lowercase V in my notes... Thanks!
Stone Preston
42,016 PointsStone Preston
42,016 Pointsno problem : )