Detect tap on a button in UITableViewCell for UITableView containing multiple sections

前端 未结 4 1850
误落风尘
误落风尘 2020-12-04 16:00

I want to detect button tap on a UITableViewCell where the parent UITableView consists of multiple sections.

I was able to do it in the case of single section, but I

4条回答
  •  误落风尘
    2020-12-04 17:01

    Swift 3 
    
    let clickedButtonIndexPath = self.tableView.indexPathForRow(at: touchPoint)
            if(clickedButtonIndexPath != nil)
            {
                NSLog("index path.section ==%ld", Int(clickedButtonIndexPath!.section))
                NSLog("index path.row ==%ld", Int(clickedButtonIndexPath!.row))
               }
    

提交回复
热议问题