I have a UITableView with a section, searchbar and a right-hand side index. Initially, everything works and is drawn properly. However, when I type into my search bar then click cancel the right index is not redrawn properly. Here's how the index looks after I click the Cancel button.
Here's normal:
[Update]
For some reason I needed to use this method to get my table reloadData to work:
-(void)searchBarTextDidEndEditing:(UISearchBar *)searchBar { ...}
instead of this method:
-(void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller { ...}
Here is my method:
/* Reset Table here */ -(void)searchBarTextDidEndEditing:(UISearchBar *)searchBar { NSLog(@"\n===searchBarTextDidEndEditing"); self.isFiltered = NO; self.tableView = self.myTableView; [self genIndexWithFilter:NO]; [self.tableView reloadData]; }
If someone can explain the subtle details, I'll upvote and accept their answer.