Summary
In this chapter, you implemented a search bar for the Journal List screen. First, you modified the JournalListViewController
class to conform to the UISearchResultsUpdating
protocol and display a search bar on the Journal List screen. Next, you modified the data source methods to display the correct journal entries when the user types in a search term. After that, you modified the prepare(for:sender:)
method to ensure that the correct journal entry details are displayed on the Journal Entry Detail screen. Finally, you modified the method used to remove journal entries.
You have now learned how to implement a search bar for your own apps, and you have also completed the JRNL app. Fantastic job!
In the next chapter, you’ll learn how to get your app ready for iPads and Macs.