Chapter 10. Collections, searching, sorting, and tab bars
This chapter covers
- Sorting and filtering data
- Displaying data in more-customizable layouts
- Using a tab bar to navigate between scenes
It’s one thing to simply display and edit your data; it’s another to do something with it—sort it, search it, or display it in a more visually interesting way.
In this chapter, you’ll extend your Bookcase app. You’ll add the ability to sort and search the books data, and you’ll display the books in a more customized grid layout. You’ll add a tab bar to navigate between the table view of books and your new grid view of books.
Specifically, we’ll explore
- Sorting the data— You’ll explore sorting your data and giving the user the ability to select the sort order with a segmented control.
- Search controllers— You’ll use a search controller to add a search bar to a scene, filtering your data and displaying search results.
- Collection views and collection view controllers—Collection views manage a collection of data and display it in a customizable layout, such as a grid. Similar to table view controllers, collection view controllers handle part of the boilerplate setup for you.
- Tab bar controllers—Tab bar controllers are useful for managing the navigation between different sections of your app.