Hide empty cells in UITableView

后端 未结 7 896
春和景丽
春和景丽 2021-01-11 12:47

I have a searchable tableview, but would like to only display the number of cells that are returned once a user starts a search. For instance, if a user types in a charecter

7条回答
  •  余生分开走
    2021-01-11 13:22

    Set the tableFooterView to some dummy view ([[UIView new] autorelease] will work fine). This prompts the UITableView to show the footer (which will have zero size) in place of the empty 'cells'.

提交回复
热议问题