Preet
Preet

Reputation: 9

UITableView Delegate

I have a table view cell with a "Show More" button. On clicking the button I want the delegate -tableView:didSelectRowAtIndexPath: to get called ?

Can someone tell me the difference between the following 2 statements:

[self tableView:self.tableView didSelectRowAtIndexPath:indexPath];

and

[[self.tableView delegate] tableView:self.tableView didSelectRowAtIndexPath:indexPath];

Upvotes: 0

Views: 96

Answers (1)

rdelmar
rdelmar

Reputation: 104082

There shouldn't be any difference between those two statements, assuming that self is the delegate of the table view, and you have a property called tableView in your controller that points to the table view (connected to the table view in IB if it's an outlet, or assigned to the table view in code if you created the table view there).

Upvotes: 1

Related Questions