I am trying to add a UISearchBar with a UIButton that has a custom image. I want the UISearchBar to be locked to the Navigation bar, but still show both the SearchBar and the Navigation Bar. I don't want the SearchBar as the Headerview for the TableView within the UITableView controller. I have tried creating a UIToolBar to hold the custom button and flexible space button. Then adding that Toolbar and the Searchbar to self.view and self.navigationController.view. Then as an extension to my initial issue, I was wondering if I could set the frame of self.tableView manually to accomodate the new size of the space available after adding the Searchbar.
1 Answers
0
votes
I believe you should check out UISearchDisplayController documentation, as it might be very close to what you have in mind. I also strongly recommend checking out the free Sensible TableView framework. The framework automatically provides all the search and table view filtering functionality which should save you a lot of time.