Modeling a To-Do List

Remember the Model-View-Controller architecture you read about in Chapter 26? You have already created a view (your storyboard and UI elements) and a controller (your ViewController class). At this point, however, you do not have a model. Create a Cocoa Touch class by selecting FileNewFile.... With iOS selected at the top, select Cocoa Touch Class from the Source section (Figure 27.18).

Figure 27.18 Creating a new Cocoa Touch class

Screen displays the creation of a new Cocoa touch class.

Get Swift Programming: The Big Nerd Ranch Guide 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.