title: UISearchBar delegates not working
body: <p>I have a UISearchBar in my view, I try to use this code to capture the text that User is typing and when the button is clicked to cancel:</p>
  
  <pre><code>@interface ClienteViewController : UIViewController &lt;UISearchBarDelegate, UISearchDisplayDelegate&gt;{
  
      IBOutlet UISearchBar *search;//is connected
  }
  
  - (void)viewDidLoad{
  
      [super viewDidLoad];
  
      search.delegate = self;
  
  }
  
  -(void)searchBarCancelButtonClicked:(UISearchBar *)searchBar{
      NSLog(@"Cancel");
  }
  
  
  -(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar{
      NSLog(@"GO");
  }
  
  -(void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope {
      NSLog(@"Search string is -&gt; %@",searchText);
  }
  </code></pre>
  
  <p>My code appear to be very simple, all I want to do is find a way to get the text you're typing the User, to know when the cancel button is clicked, and show the results on the console, but it does not work, what can be happening?</p>