【发布时间】:2021-11-07 17:28:21
【问题描述】:
如何以 porgrmatically 检测 tableView 单元格的特定区域?
例如,如果用户点击 tableView 单元格的左半部分,则会调用 didSelectRowAt 并识别单元格的左半部分。
伪:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("Entire cell tapped")
if(left side of cell pressed){
//cell.width /2
print("left side half of cell pressed")
}
}
【问题讨论】:
标签: ios swift uitableview tableview