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.
UISearchBar is not automatically setting its size add this code:
[searchController.searchBar sizeToFit];
Apple Sample
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With