Why we are checking if (cell == nil) in UITableViewController?

前端 未结 2 2014
梦毁少年i
梦毁少年i 2021-01-18 04:52

I am trying to implement UITableView based Application.For that I select UITableViewStyle is Group.In my TableView their is 15 section each section having 1

2条回答
  •  甜味超标
    2021-01-18 05:16

    The test if (cell == nil) handles the case where there are no reusable cells to dequeue, in which case you must create a new cell. When you create the new cell, you are responsible for constructing its view hierarchy.

提交回复
热议问题