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!
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

mohammed sharawi
475 Pointsuiimage view
Add the UIImageView as a subview to the instance of UIView named 'catView'.
1.
2.
3./* Write your code below this line */
4.UIImage *image = [UIImage imageNamed:@"lolcat.png"];
UIImageView *imageView = [ [UIImageView alloc] initWithImage:image];
[self.view addSubview:'catView'];
i can't figure this one out! for line 6. i tried everything
3 Answers

John Wheal
27,969 PointsI'll warn you that I haven't watched any of the iOS videos. You are adding 'catView' as the subview but you have put it in quotation marks and haven't declared it.
I guess it should say: [self.view addSubview:imageView];

mohammed sharawi
475 Pointsthat does not work.