I set the setShowsScopeBar to TRUE from the very beginning, and that works perfectly. But once I search something and then cancel my search, the Scope Bar disappears.
How to keep scopebar even after pressed Cancel button?
Apparently, in earlier version, with the UISearchBar,
- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar
{
[searchBar setShowsScopeBar:YES];
return YES;
}
This worked. But with the SearchController, it isn't the case anymore.
I have tried this:
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
searchController.searchBar.showsScopeBar = YES;
[searchController.searchBar sizeToFit];
isSearching = NO;
}
with no luck.
Are there any possible solutions out there on iOS 9?