When I add my searchBar
as a headerView
of tableView
, all the delegate methods are fired as expected.
self.myTableView.tableHeaderView = self.searchController.searchBar;
But if I take a searchBar IBOutlet from StoryBoard and assign it to self.searchController.searchBar
, delegated methods are not fired!
_mySearchBar = self.searchController.searchBar;
I've also tried embedding the mySearchBar
into a view and then assign:
_mySearchBarView = self.searchController.searchBar;
But no success!
Am I doing something wrong