I have a tableview with buttons and I want to use the indexpath.row when one of them is tapped. This is what I currently have, but it always is 0
var point =
For Swift2.1
Swift2.1
I found a way to do it, hopefully, it'll help.
let point = tableView.convertPoint(CGPoint.zero, fromView: sender) guard let indexPath = tableView.indexPathForRowAtPoint(point) else { fatalError("can't find point in tableView") }