What is -[UITableViewDelegate willDisplayCell:forRowAtIndexPath:] for?

前端 未结 1 722
粉色の甜心
粉色の甜心 2020-12-02 13:06

In all of my UITableView programming, I\'ve always configured my UITableViewCells in -[UITableViewDataSource tableView:cellForRowAtIndexPath:

相关标签:
1条回答
  • 2020-12-02 13:49

    You use that to configure things like font and text color. In the newer version of the iPhone, with certain table configurations, if you configure things like the label text color in the tableView:cellForRowAtIndexPath: method, your changes will be lost at some point before the cell is actually displayed. Here you can do things like change the label's color, adjust background highlighting, such things as these.

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