How do you load custom UITableViewCells from Xib files?

前端 未结 23 2043
抹茶落季
抹茶落季 2020-11-22 11:11

The question is simple: How do you load custom UITableViewCell from Xib files? Doing so allows you to use Interface Builder to design your cells. The answer app

23条回答
  •  庸人自扰
    2020-11-22 11:40

    If you're using Interface Builder to make cells, check that you've set the Identifier in the Inspector. Then check that it's the same when calling dequeueReusableCellWithIdentifier.

    I accidentally forgot to set some identifiers in a table-heavy project, and the performance change was like night and day.

提交回复
热议问题