I want to find out how to add a UISearchBar to a TableViewController – but not to the table view header.
I am having trouble with my existing search bar disappearing after scrolling in certain scenarios. I have found ways to make the search bar “float”, but in a couple of corner cases the search bar still disappears after scrolling.
After googling this issue I have found that some people have taken the search bar out of the table view header to deal with this issue. That is relatively easy if your table view is added to a UIViewController. But how do you add a new view (in this case a search bar) to a TableViewController – that is not a subview of the table view automatically provided by the TableViewController?
iPad app iOS 6
-Thanks
Mike C.
Since nobody from either Stackoverflow, or the Apple Developer’s forums responded, I got help from Ron Adams in the Idaho branch of Cocoaheads. Basically, I ended up changing my UITableViewController to a UIViewController and manually adding the tableview and search bar. A little extra work, but it works great!