1

I am using a button to show and hide the searchbar. I am using the this code to display the

- (IBAction)searchButton:(id)sender
{
    [self.searchDisplayController setActive:YES];
    [self.searchDisplayController.searchBar becomeFirstResponder];

}

It works as expected but the problem is

searchBarCancelButtonClicked:(UISearchBar *)searchBar 

never gets called. But when i select the searchbar, the cancel button works and the delegate is called properly. Other delegates work but just the cancel does not work when it searchbar is called by IBAction. In ios 6, it works fine both ways.

Please help.

Deepak ML
  • 79
  • 1
  • 13

0 Answers0