How can I modify the appearance of 'empty' cells in plain UITableView?

前端 未结 8 2263
广开言路
广开言路 2020-12-08 21:18

If you have a plain (not grouped) UITableView with a single row, the rest of the screen is filled with blank or empty cells. How do you change the appearance of these blank

8条回答
  •  生来不讨喜
    2020-12-08 22:01

    If you simply want to change the height of the "empty cells" when there are no cells at all in your TableView: you need to set the rowHeight property of your UITableView (the implementation of tableView:heightForRowAtIndexPath: has no effect on empty TableViews). If there are cells in your TableView and you have implemented tableView:heightForRowAtIndexPath: then the last row height will be used for empty cells.

提交回复
热议问题