What I want:
A UIView with a UISearchBar at the top. Starting to edit the searchBar dims the current view and shows search results from another [UITableView]Controller.
What I've tried:
In Interface Builder:
- add a "Search Bar and Search Display Controller" to the UIView.
- add a placeholder object for my UITableViewController
- add a UITableView object and set it as the view for the UITableViewController
- set the delegate for the UISearchBar to the UITableViewController
- set all the outlets on the UISearchDisplayController to the UITableViewController
In Code:
- add the UISearchBarDelegate, UISearchDisplayDelegate protocols to the UITableViewController
What I'm getting:
Tapping to edit the search field crashes the app. No error messages, and only the "viewDidLoad" method in the UITableViewController gets called.
In Conclusion:
How do I go about using an external controller for a UISearchBar that is in a UIView?