cast value of type 'UITableViewCell' to Custom Cell

前端 未结 2 1549
小鲜肉
小鲜肉 2020-12-07 04:41

I usually never have a problem with this step, but for some reason when I re set up my storyboard now I have an issue with this part of my code:

func tableVi         


        
相关标签:
2条回答
  • 2020-12-07 05:16

    One of the reason,May be in Identity inspector module is different then your project name .

    0 讨论(0)
  • 2020-12-07 05:34
    • You may have forgotten to tell the storyboard that this cell is a TableViewCell. Select the prototype cell and set the Custom Class in the Identity inspector.

    • You may have called registerClass:forCellReuseIdentifier:. If so, delete that call; it actually prevents us from getting the cell from the storyboard.

    • You are calling tableView.dequeueReusableCellWithIdentifier. That is a big mistake. You should call tableView.dequeueReusableCellWithIdentifier:forIndexPath:.

    0 讨论(0)
提交回复
热议问题