Here's what's happening:
The user clicks search and sees the following image:
Then the user starts typing in a term and as soon as that happens the NavigationBar disappears. What you're looking at here is an empty space where the Navigation Bar was attached. I've tried everything and cannot figure out why it's doing this. And no the ViewController is not a root view to a NavigationController (THERE IS NO UINavigationController).
Here's the relevant code for my search delegate:
- (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
{
if ([searchText length] == 0)
{
[self.aTableView reloadData];
return;
}
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF.title contains[cd] %@ OR SELF.summary contains[cd] %@", searchText, searchText];
mFilteredArray_ = [[self.parseResultsCanadaSection filteredArrayUsingPredicate:predicate] copy];
[self.aTableView reloadData];
}
#pragma mark - UISearchDisplayController delegate methods
-(BOOL)searchDisplayController:(UISearchDisplayController *)controller
shouldReloadTableForSearchString:(NSString *)searchString
{
[self filterContentForSearchText:searchString
scope:[[self.searchDisplayController.searchBar scopeButtonTitles]
objectAtIndex:[self.searchDisplayController.searchBar
selectedScopeButtonIndex]]];
return YES;
}
- (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller {
}
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
mFilteredArray_ = nil;
[self.aTableView reloadData];
}
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
mFilteredArray_ = nil;
[self.aTableView reloadData];
}