[英]Assistive touch Laggy with Tableview
嗨,我在首頁上有一個帶有自定義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筆尖,如下所示:
TransactionTable.register(UINib(nibName:"TransactionsListCell", bundle: nil), forCellReuseIdentifier:"TransactionsListCell")
而且單元格如此簡單,包含一個圖像和4個標簽,我甚至嘗試不配置單元格(不加載任何圖像和文本)但沒有結果。 謝謝你的幫助
我發現問題是由我用來創建帶圓圈的UIImageViews的庫(稱為“ SwiftyAvatar”)引起的,刪除它可以解決問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.