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

Anthony Ho
Anthony Ho
10,228 Points

Cannot open message in Inbox

I've labelled the Segue correctly, but I'm unable to open my retrieved messages to view image

-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
    if ([segue.identifier isEqualToString:@"showLogin"]){
        [segue.destinationViewController setHidesBottomBarWhenPushed:YES];
    } else if ([segue.identifier isEqualToString:@"showImage"]){

        [segue.destinationViewController setHidesBottomBarWhenPushed:YES];

        ImageViewController *imageViewController = (ImageViewController *)segue.destinationViewController;
        imageViewController.message = self.selectedMessage;

    }

2 Answers

Andrew Elster
Andrew Elster
3,974 Points

Did you accidentally implement did*DeselectRowAtIndexPath instead of didSelect*RowAtIndexPath?

Anthony Ho
Anthony Ho
10,228 Points

Yeh i did. Thanks

Andrew Elster
Andrew Elster
3,974 Points

Autocomplete has bitten me a number of times with that one :-)

Hello Anthony!

I'd be happy to help you! I just need to know more about your problem.

The above code is correct, so I'm thinking that your IBOutlet for the ImageView may be the problem.

Take a look at how mine is setup: Link To Screenshot

I'm sure we can get your bug squashed :)

Anthony Ho
Anthony Ho
10,228 Points

I don't think it's the IBOutlet. https://www.dropbox.com/s/jcdpjaiyjtpkcb6/Screen%20Shot%202014-08-19%20at%2011.07.11.png

When I have two messages, i touch the first message, but it doesn't open.

https://www.dropbox.com/s/hk5iji9v50645nd/2014-08-19%2011.26.34.png

it only opens when i touch the second message after a couple of seconds

https://www.dropbox.com/s/tfs1flopm8e66hi/2014-08-19%2011.26.39.png