These two photos should explain this. The first one shows mine UITableViewas a rule. The second one shows when I touch UISearchBarand it focuses. Why is there a gap between the cell title and the search bar? Does anyone know how to fix this?
iOS 7 when this happens, by the way. I already have this code:
- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if (tableView == self.searchDisplayController.searchResultsTableView)
{
return 0;
}
else
{
return 23;
}
}


source
share