0

Say I have a table view controller in Swift. In an MVC type setting would a Table View Cell represent the view portion and if I were to create a separate model class that the table view controller used as part of its data source would this conform to the MVC structure? Or would the Table View Controller itself be classed as a mixture still of view and controller?

rmaddy
  • 298,130
  • 40
  • 468
  • 517
  • You don't need a fancy model class. Something as simple as an array can be your model. The view is the UITableView (the cells, the headers, etc). The controller is the UITableViewController, of course. Check out the Stanford iOS Programming course on iTunes U. In the second video, the prof talks about MVC and gives a great overview of the ways the different parts can and cannot communicate with each other. – vacawama May 10 '18 at 21:17
  • Link to [Stanford Course](https://itunes.apple.com/us/course/developing-ios-11-apps-with-swift/id1309275316) – vacawama May 10 '18 at 21:21

1 Answers1

0

Creating a model class that the View Controller used for it's data source would be more akin to the MVVM (Model-View-ViewModel) pattern.

See here

barnabus
  • 842
  • 7
  • 25