This is probably because you are using UISerchDisplayController, it's an easy way to implement search functionalities, but with custom interfaces is a pain.
In my opinion is better that you manage search by yourself. Or you can try with UISearchDisplayDelegate, but on iOS7 I had a lot of main issues trying to change the searchTableView according to the app design.
In the first 2 methods I try to change the frame of the search tvc returned from the search display controller. In iOS7 this code is almost useless, they changed something internally.
#pragma mark -
#pragma mark UISearchDisplayController Delegate Methods
- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller{
NSLog(@"Old frame %@",NSStringFromCGRect(oldTableViewFrame));
[UIView beginAnimations:@"" context:NULL];
[UIView setAnimationDuration:1.5];
self.receiptsTableView.frame= self.view.bounds;
[UIView commitAnimations];
}
- (void)searchDisplayControllerWillEndSearch:(UISearchDisplayController *)controller{
[UIView beginAnimations:@"" context:NULL];
[UIView setAnimationDuration:1.5];
self.receiptsTableView.frame= CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.x+self.imageContentView.bounds.size.height, self.view.bounds.size.width, self.view.bounds.size.height-self.imageContentView.bounds.size.height);
[UIView commitAnimations];
}
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
{
[self filterContentForSearchText:searchString scope: (NSString*)scopes[[self.searchDisplayController.searchBar selectedScopeButtonIndex]]];
// Return YES to cause the search result table view to be reloaded.
return YES;
}
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchScope:(NSInteger)searchOption
{
[self filterContentForSearchText:[self.searchDisplayController.searchBar text] scope:scopes[searchOption]];
// Return YES to cause the search result table view to be reloaded.
return YES;
}