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 trialBrandon Lim
11,540 PointsWhere is the "didSelectRowAtIndexPath" function when using Xcode 5.1.1? I can't seem to find it.
I can't find the "didSelectRowAtIndexPath" function. The tutorial was fine until now. I can't seem to find what they are talking about.
1 Answer
Stone Preston
42,016 Pointsin older versions of Xcode (the one used in the video) that method got implemented for you automagically whenever you subclassed UITableViewController. In the new version of Xcode (Xcode 5+) that does not happen anymore so you have to implement it yourself. you can just copy and paste the method in:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}
or you can start typing -(void)tableView
and then select the method from autocomplete. be sure you select didSelectRow and not didDeselectRow