4

I have been searching and haven't been able to make it work.

TableviewcontrollerA segues a TableviewcontrollerB with searchbar as firstresponder

When user taps cancel, I want to go back to TableviewcontrollerA

I have tried quite a few things in the below method with no luck. What am I missing?

Thanks BTW - The segue is done on IB, not code

-(void) searchBarCancelButtonClicked:(UISearchBar *)searchBar{


}
Bhavin Ramani
  • 3,221
  • 5
  • 30
  • 41
William Falcon
  • 9,813
  • 14
  • 67
  • 110

1 Answers1

13
-(void) searchBarCancelButtonClicked:(UISearchBar *)searchBar{
    [self.searchDisplayController setActive:NO animated:YES];
    self.navigationController popToViewController:UIViewControllerA animated:YES;
}
LE SANG
  • 10,955
  • 7
  • 59
  • 78