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 =
In Swift 3. Also used guard statements, avoiding a long chain of braces.
func buttonTapped(sender: UIButton) { guard let cellInAction = sender.superview as? UITableViewCell else { return } guard let indexPath = tableView?.indexPath(for: cellInAction) else { return } print(indexPath) }