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

I am having trouble getting the inbox to push ImageViewController to the top of the stack?

I have tried deleting my ImageViewController, deleting the view controller from the storyboard and starting again and all my code lines up but I am still not able to get the didSelectRowAtIndex path to push the view to the top of the stack?

Here is my code:

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

I also have a image of my segue identifier

http://i61.tinypic.com/2q9cb9g.jpg

[update] Never Mind i just realized what I did, i wrote didDeselect instead of didSelect...... 2 hours of life wasted because of 2 letters... sigh[update]

2 Answers

You beat me to it!

didDeselectRowAtIndexPath is used here - I did the same thing when I did that course and it took me a while to figure out!!

Glad you're fixed!

Steve.

Ya it drove me insane. I am a little trigger happy with auto-complete in XCode so I have learned to slow it down.