title: Searching a table view with UISearchBar
body: <p>I am using this code to search through a UItableView:</p>
  
  <pre><code>-(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
  
  
  
  if(searchText.length == 0)
  {
      isFiltered = FALSE;
  }
  else
  {
      isFiltered = TRUE;
  
  
      if (filteredTableData == nil)
         filteredTableData = [[NSMutableArray alloc] init];
      else 
          [filteredTableData removeAllObjects];
  
      for (NSString* string in self.itemArray)
      {
          NSRange nameRange = [string rangeOfString:searchBar.text options:(NSCaseInsensitiveSearch|NSDiacriticInsensitiveSearch)];
          if(nameRange.location != NSNotFound)
          {
              [filteredTableData addObject:string];
          }
      }
  }
  [tableView reloadData]; 
  [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade];
  }
  </code></pre>
  
  <p>Everything works fine, but if I press the cancel button which appears when I start editing, my list doesn't come back, but the search results remain. To show back the list, I have to begin typing, even a single character in the searchbar and then delete it or press the "x" to see all the list. Is there a way to block the cancel button? Or to show the list when it is pressed?</p>