Sections and Sorting

Your current table sort is not really set up with the end customer in mind. The valet might think in terms of time parked, but the end customer remembers his or her car. Helping the valet’s customer, and therefore your customer, means adding the ability to sort by attributes of the car in addition to the park time. This makes four ways you could group the data: park time, car make, car model, or car year.

When you show groups, you need to make sure the sort order makes sense. Each of the four groups in this case has an associated sort: park time and car year are descending by time, and make and model are ascending.

In Chapter 9, “Introducing Core Data,” you saw that a fetched results controller uses a fetch request to find ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.