I am running into a peculiar issue regarding a scope bar shown under my UISearchBar. Basically, the issue I previously had was that whenever my UISearchController was active and the user switched tabs, if he came back to the UIViewController containing the UISearchController, the background would turn back. This issue was solved by embedding the UIViewController into a UINavigationController.
Now, a new issue has appeared. When I switch tabs with the UISearchController already active, when I switch back, the UIScopeBar is displayed on top of the UISearchBar. This can only be fixed by Canceling the search, and starting over.
I have tried hiding the following code:
-(void)viewWillAppear:(BOOL)animated{
if(self.searchController.isActive){
[self.searchController.searchBar setShowsScopeBar:TRUE];
}
}
-(void)viewDidDisappear:(BOOL)animated{
if(self.searchController.isActive){
[self.searchController.searchBar setShowsScopeBar:FALSE];
}
}
To no avail. If anybody has a trick for this one, I'd be glad to try it out.
