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
Anton Rivera
3,806 PointsViewing 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.