In this recipe, we will learn how to provide search functionality for the content in a table view.
Create a new project in Xamarin Studio and name it SearchTableApp
. Add UIViewController
and name it SearchController
.
Open the
SearchController.xib
file in Interface Builder. Add Search Bar and Search Display Controller inUITableView
. The following screenshot shows theUISearchDisplayController
object selected in the object browser:Add
UITableView
and connect it to an outlet. Save the document.Back in Xamarin Studio, create a
UITableViewSource
subclass that will act as the data source for the table view. Refer to the Displaying data in a table recipe in this chapter for information on how to do this. This time, make sure that theList<string>
variable, which will hold...