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

Anton Rivera
Anton Rivera
3,806 Points

Viewing Images Using UIImageView video

Hello,

I just finished working through this video and when I select the message in the inbox it doesn't perform the segue to the Image View Controller. It just highlights the cell and doesn't do anything. I tried changing the segue so that it went from the cell to the Image View Controller and that did show the Image View Controller after entering the following code ImageViewController.m:

PFFile *imageFile = [self.message objectForKey:@"file"]; NSURL *imageFileUrl = [[NSURL alloc] initWithString:imageFile.url]; NSData *imageData = [NSDatadataWithContentsOfURL:imageFileUrl]; self.imageView.image = [UIImage imageWithData:imageData];

The app crashes when I select the cell. The error says that imageFile.url is nil.

Please help.