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 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.