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

UITableViewCell with an Image Code Challenge

http://teamtreehouse.com/library/build-a-blog-reader-iphone-app-2/adapting-data-for-display/uitableviewcell-with-an-image

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

you 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;

Turns out I jotted it down with a lowercase V in my notes... Thanks!

no problem : )