Reloading UITableView behind UISearchDisplayController

前端 未结 9 2103
南旧
南旧 2021-02-07 11:26

I\'ve run into this really strange phenomenon that I can\'t quite figure out. I have a UITableViewController that manages a UITableView. Pretty simple. I also have a UISearch

9条回答
  •  感情败类
    2021-02-07 11:51

    Our solution is to do the following. It has only been tested in iOS 7:

    1. In viewForHeaderInSection, return nil if self.searchDisplayController.active is YES
    2. In didHideSearchResultsTableView, call [self.tableView reloadData] to reload the headers when the search table disappears

提交回复
热议问题