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

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


[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!


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