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 trialAnthony Ho
10,228 PointsCannot 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
3,974 PointsDid you accidentally implement did*DeselectRowAtIndexPath instead of didSelect*RowAtIndexPath?
Ryan Ackermann
14,665 PointsHello 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
10,228 PointsI 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
Anthony Ho
10,228 PointsAnthony Ho
10,228 PointsYeh i did. Thanks
Andrew Elster
3,974 PointsAndrew Elster
3,974 PointsAutocomplete has bitten me a number of times with that one :-)