Reputation: 4138
I have a UISearchController, whose searchBar is set as my tableView's tableHeaderView:
tableView.tableHeaderView = searchController.searchBar
It's working great on my device that runs iOS9:
But when I run it on my device that's running iOS8 there is no search bar.
From what I've read, the UISearchController is available for iOS8 and later. So I do not understand why its searchBar does not show up on my iOS8 device.
Upvotes: 10
Views: 2151
Reputation: 305
UISearchBar is not automatically setting its size add this code:
[searchController.searchBar sizeToFit];
Upvotes: 23