Reputation: 343
I'm using same custom table view cell in multiple classes, the cell has a button in it. To make button work in different tableviews( in different classes),a protocol method is called when the button on the cell is pressed. This protocol method is implemented in all the classes in which the custom table view cell is used. Can anyone please tell me where to set the delegate for the protocol?
Thanks
Upvotes: 0
Views: 816
Reputation: 1542
I think you can set cell.delegate in tableview's datasource method: tableView:cellForRowAtIndexPath:. Something like cell.delegate = self;.
Upvotes: 0