title: Cancel button on UISearchbar
body: <p>I've created a <code>UISearchbar</code> with a cancel button, but when I click on the cancel button, it does not show the array and it just dismisses the keyboard.</p>
  
  <p><code>allItems</code> is <code>NSArray</code> and 
  <code>displayItems</code> is <code>NSMutableArray</code></p>
  
  <pre><code>-(void)searchBarSearchButtonClicked:(UISearchBar *)asearchBar{
  [displayItems addObject:allItems];
  [searchBar resignFirstResponder];
   }
  
  
  -(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText{
  
  if ([searchText length] == 0) {
      [displayItems removeAllObjects];
      [displayItems addObjectsFromArray:allItems];
  
  } else {
  
      [displayItems removeAllObjects];
      for (NSString * string in allItems ){
          NSRange r =[string rangeOfString:searchText options:NSCaseInsensitiveSearch];
  
          if (r.location != NSNotFound){
              [displayItems addObject:string];
          }
      }
  
      [tableView reloadData];
  
  } 
  
   }
  
  
         - (UITableViewCellAccessoryType)tableView:(UITableView *)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath{
  return UITableViewCellAccessoryDisclosureIndicator;
  }
  
   -(void)searchBarCancelButtonClicked:(UISearchBar *)asearchBar{
  [displayItems removeAllObjects];
  [displayItems addObjectsFromArray:allItems];
  [searchBar resignFirstResponder];
  }
  -(void)searchBarSearchButtonClicked:(UISearchBar *)asearchBar{
  [searchBar resignFirstResponder];
  }
  </code></pre>