UISearchDisplayController not correctly displaying custom cells

后端 未结 6 1519
抹茶落季
抹茶落季 2020-12-29 11:58

So I have a tableView that has sections and rows, and it uses a custom cell class. The custom cell has an image view and a few labels. The table view works fine, and the sea

6条回答
  •  鱼传尺愫
    2020-12-29 12:58

    If you create a cell in the storyboard you should not register the class (this actually screws things up). You register the class if you make the cell in code , and you register a nib if you make the cell in the nib. If you make it in the storyboard, you don't register anything, you use dequeueReusableCellWithIdentifier:forIndexPath:, and you don't need the if (cell == nil) clause at all.

提交回复
热议问题