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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.