Hi I have a view that contains 2 tableviews.
For a single view I know this delegate method can help me fill content of each row
- (void) tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
But since I have 2 tableviews, how can I refer to each of them and fill content separately?
Thanks for helping!
The “current” tableview will pass a pointer to itself along as an argument when calling its delegate’s methods like the one you mentioned.
So, all you need to do is to compare the pointer (tableView) to references of the two tableviews that you stored or added as property previously.
Proceed like so within your delegate methods:
Edit: Both tableviews need to share the same delegate for this to work, which would make sense anyway since they appear on the same view.