UISearchDisplayController and table
when I开发者_StackOverflow中文版 add a UISearchDisplayController from interface build, it comes with a search bar. what about the results table? do I need to add a UITableView myself, or is that already included?
which delegate methods do I need to use?
Yes you will need to add a UITableView.
Also ensure your view controller has the appropriate UITableView delegate functions/methods (numberOfSectionsInTableView, cellForRowAtIndexPath and etc)
In addition look into implementing the UISearchDisplayDelegate and UISearchBarDelegate for your search bar.
UISearchDisplayDelegate documentation UISearchBarDelegate documentation
精彩评论