I have a tableView dynamically populated with custom cells in several sections.
In my CustomCell class I have an @IBAction for a custom checkbox button in the cell.
One of the ways, suppose you have custom cell and button inside a cell ... Usual pattern would be: (if you're using table view with datasource) when configuring the cell inside:
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
you can set:
cell.button.tag = sectionIndex
So in:
func checkboxButton(sender: CheckBox) { ...
sender.tag would be sectionIndex
Hope you got the idea.