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