[UITableViewCell nameLabel]: unrecognized selector sent to instance

后端 未结 2 1104
长情又很酷
长情又很酷 2021-01-15 01:36

I was wondering whether anyone knew how to solve this problem?

*** Terminating app due to uncaught exception \'NSInvalidArgumentException\', reason: \

相关标签:
2条回答
  • 2021-01-15 02:00

    seems like you aren't using your subclass of the table cell. The error shows you try to use regular UITableCell instances. Make sure you set the cell class in the nib or storyboard as FolderCellTableViewCell,Please follow steps below,It may help you

    1. select your cell view,
    2. open the inspector and goto to tab 3.
    3. Fill out 'Custom Class' to point to YOUR class FolderCellTableViewCell
    0 讨论(0)
  • 2021-01-15 02:21

    You're casting the cell you get to a FolderCellTableViewCell but in fact the cell you receive from [foldertableView dequeueReusableCellWithIdentifier:foldersIdentifier]; is a UITableViewCell not a FolderCellTableViewCell. Make sure your storyboard table view cell is of class FolderCellTableViewCell.

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