Is calling cellForRowAtIndexPath: ever practical?

前端 未结 3 1613
粉色の甜心
粉色の甜心 2020-12-11 04:51

I\'ve seen many many developers when implementing a UITableViewDelegate and UITableViewDataSource directly call cellForRowAtIndexPat

3条回答
  •  天命终不由人
    2020-12-11 05:20

    Retrieving data from the cell makes no sense as the data being inserted into the cell would be known to the developer. The developer can straight away get the data. Another problem, (big one) with this approach is that if that cell is not visible, it would be first generated and then the data retrieved.

提交回复
热议问题