O'Reilly logo

The Core iOS Developer’s Cookbook, Fifth Edition by Rich Wardwell, Erica Sadun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe: A Core Data–Powered Collection View

It takes work to convert Recipe 12-3 from a table to a collection view, but it doesn’t take an overwhelming amount. Ditch the search view controller, get rid of the index view, update the edits a little, and switch out the controller class from table to collection. Figure 12-3 shows the results. This collection view displays the same data as the table did, offering selectable cells, edits, and undo/redo support.

Image

Figure 12-3 Recipe 12-4 builds a collection view powered by Core Data.

The refactoring story begins with the data model. Recipe 12-4 adds a new attribute, a binary data item called imageData ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required