cell imageView in UITableView doesn't appear until selected

前端 未结 8 1939
慢半拍i
慢半拍i 2020-12-24 01:44
  1. Here is a video of the problem: http://youtu.be/Jid0PO2HgcU

  2. I have a problem when trying to set the image for the [cell imageView] in a UITableView

8条回答
  •  情深已故
    2020-12-24 02:43

    I was having a similar problem. I had registered the default UITableViewCell class instead of my custom class.

    I had this:

    tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: visibilityCellIdentifier)
    

    but I should have had this:

    tableView.registerClass(VisibilityCell.self, forCellReuseIdentifier: visibilityCellIdentifier)
    

    The cell creation all looked to be working as I stepped through the debugger, but nothing showed up until I selected each row.

提交回复
热议问题