【发布时间】:2023-03-13 11:01:37
【问题描述】:
嗨,我的第一页上有一个带有自定义 Xib 的简单 Tableview,但是当 tableview 被填充时,Assistive Touch 变得迟钝,它不在没有 tableview 的其他页面中,并且 tableview 本身在滚动时并不迟钝,它只有5行
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
print("tableview Called")
let cell = tableView.dequeueReusableCell(withIdentifier: "TransactionsListCell") as!TransactionsListCell
cell.tag = indexPath.row
let cellClicked = UITapGestureRecognizer(target: self, action: #selector (self.CellClicked(sender:)))
cell.addGestureRecognizer(cellClicked)
return cell
}
我已经在 viewdidload 中注册了 tableview nib,如下所示:
TransactionTable.register(UINib(nibName:"TransactionsListCell", bundle: nil), forCellReuseIdentifier:"TransactionsListCell")
单元格非常简单,包含一个图像和 4 个标签,我什至尝试不配置单元格(不加载任何图像和文本)但没有结果。 谢谢你的帮助
【问题讨论】:
-
@AdityaSrivastava 这不是问题,我什至也尝试删除该行
标签: ios swift uitableview tableview