I have a weird requirement, or at least something I have never done before... I have a UITableView
, the header of that table is a UISearchBar
. If you tap on that searchbar the "Search Display Controller" shows up and let you search... But now I need to remove that searchbar and call the "Search Display Controller" from a button.
The problem is that if I remove the SearchBar when I call (from the button):
[self.searchDisplayController setActive:YES animated:YES]
I can't see the UISearchBar on top of the View.
I have no idea how to fix this... I have already tried:
self.tableView.tableHeaderView = nil
in the viewDidLoad and when touching the button I set the UISearchBar as the table header again... it looks ugly and the animation is not smooth at all.- hide the searchbar and show it when the button is pressed. (i get an empty space in the tableview's header) and the animation is really bad, because the
UISearchBar
gets first displayed in the header and the it's moved up to the top of the view...
Any help will be more than welcome!! Thanks!