Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Build a Self-Destructing Message iPhone App Retrieving and Viewing Data from Parse.com Viewing Images Using UIImageView

Alfonso Lagrasta
Alfonso Lagrasta
7,551 Points

Segue from inBox to ImageView is not performed

Hi all,

I'm having trouble with showing the image from the inBox table view. When I tap on the message to see it the segue does not perform. Here's the code:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {


    PFObject *message = [self.messages objectAtIndex:indexPath.row];
    NSString *fileType = [message objectForKey:@"fileType"];
    if ([fileType isEqualToString:@"image"]) {
        [self performSegueWithIdentifier:@"showImage" sender:self];
    }
    else {
            }
}

Here's my storyboard:

https://drive.google.com/file/d/0B_UWpaGEcMjLUjBoNVM5aWVpOEU/view?usp=sharing

I named the segue Identifier: 'showImage' as in the code above.

Thanks for helping!

Alfonso Lagrasta
Alfonso Lagrasta
7,551 Points

I've fixed it, there was an error in retrieving the file type.

Francisco Navarro
Francisco Navarro
14,185 Points

Hi!

Have you checked if the performSegueWithIdentifier's method takes place with a breakpoint? the code looks good

1 Answer

Alfonso, here is a full template for the social network application: Click Here.