Reputation: 119
I am using tableView in a viewcontroller1 and implementing a didSelectRowAtIndexPath for moving to viewController2 with some data and displaying it on a tableView on viewController2...for now everything is ok, but then when I implement the code on viewController2:
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath) {
// some code
}
After I selecting a row its selected and colored in blue but never stop's in the method didSelectRowAtIndexPath
.
What can be the problem?
Upvotes: 0
Views: 1431
Reputation:
You should set not only the data source of the table view to your view controller, but the delegate also:
tableView.delegate = self;
Upvotes: 1
Reputation: 89509
You need to set the delegate of your tableView, either in your storyboard or XIB file, or programatically.
Upvotes: 0