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 trialJudah Morales
2,481 PointsStrange touch behavior in tableview
I've made it through the entire tutorial, and everything seems to work as expected except the behavior that occurs when I touch the table cell to view the image or video. I have to select multiple cells in order to view one. It's hard to explain so I made a video to showcase what I was seeing. This happens in the simulator as well as on the phone so I assume it's a code issue that I managed to screw up. Any help is greatly appreciated.
2 Answers
Stone Preston
42,016 Pointslooks like you may have implemented didDeselectRowAtIndexPath instead of didSelectRowAtIndexPath. go ahead and go back and double check your tableViewController delegate methods and make sure you implemented
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
and not
//this is the wrong method
- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
Judah Morales
2,481 PointsThanks Stone. Can't believe i overlooked that, lol. Thanks so much for the help! Works great now!
Stone Preston
42,016 Pointsno problem. Ive made the mistake myself a lot. Its easy to do since didDeselectRow comes before didSelect row in the list of suggested methods to auto fill in