We will start out in a single view app with a tableView. Open up the starter project for this chapter, and you will see that we have created a searchController and configured it using configureSearchController() to include the searchBar of the searchController as the tableHeaderView of tableView, as follows:
func configureSearchController() { searchController.obscuresBackgroundDuringPresentation = false searchBar.showsCancelButton = true searchBar.text = "scotteg" searchBar.placeholder = "Enter GitHub ID, e.g., \"scotteg\"" tableView.tableHeaderView = searchController.searchBar definesPresentationContext = true }
Also, we have already bound the data sequence of a viewModel to the tableView, as shown:
viewModel.data .drive(tableView.rx.items(cellIdentifier: ...