You can watch this episode by subscribing to Cocoacasts Plus.

Mastering MVVM With Swift

Supercharging MVVM With Protocols

Let's apply what we learned in the previous episodes to the week view controller. The week view controller currently configures the cells of its table view. That's something we want to change. The refactoring of the week view controller involves four steps. We create a view model for each table view cell. The WeekViewViewModel generates a view model for each table view cell. We define a protocol which the view models for the table view cells conform to. The WeatherDayTableViewCell is able to configure itself using a view model.

Purchase Course

Purchase Mastering MVVM With Swift and access it whenever you want and for as long as you want.

Join Cocoacasts Plus

Join Cocoacasts Plus and access every 350+ tutorials including Mastering MVVM With Swift.

Next Episode "Ready, Set, Test"