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.
In Swift 3.0, some things are slightly changed like 'CGPointZero' - > 'CGPoint.zero' & 'indexPathForRowAtPoint' -> 'indexPathForRow(at:position)'
etc so you can get the real row and section of the tapped button from this code:
let position: CGPoint = sender.convert(CGPoint.zero, to: self.tableView)
if let indexPath = self.tableView.indexPathForRow(at: position)
{
let section = indexPath.section
let row = indexPath.row
}