UISearchController searchbar hides the first cell in tableview

后端 未结 2 2010
余生分开走
余生分开走 2021-01-12 02:11

I have a tableview with a search bar. The search bar is provided by a UISearchController. When I add the search bar to the header view of the table, the first row of the tab

相关标签:
2条回答
  • 2021-01-12 02:38

    It seems that you have to explicitly set the scope button titles array if you don't have scope button titles.

    self.searchController.searchBar.scopeButtonTitles = [NSArray array];
    
    0 讨论(0)
  • 2021-01-12 02:38

    Found this issue to be a layout constraints issue. Resolved by dropping all of my constraints in the view containing my searchcontroller and adding back in individually until I found the offending constraint. Using Xcode 7.1

    0 讨论(0)
提交回复
热议问题