Loading a Table View

The small app you just created should give you an idea of how to structure much larger apps. If you give each view its own file, that separation of concerns will keep things loosely coupled. This is an MVC (model view controller) without the model. When you’re loading data for a table view, you must have a model because table views contain data.

We will now create another application from scratch. Create a new single-view project, with all the same settings as before. Choose File > New > Project, choose Single View Application, and give it a name. Create that project and save it. You should now have a blank single-view application with the first view set. Delete that first view by selecting the view controller button on ...

Get Learning Swift™ Programming now with O’Reilly online learning.

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