You can watch this episode by subscribing to Cocoacasts Plus.

Building a Weather Application From Scratch

Adding Flexibility With Protocols

At the end of the previous episode, I mentioned that I'm not quite happy yet with the implementation of the RootViewModel class. It passes an instance of the DarkSkyResponse struct to the RootViewController class via a completion handler. The RootViewController class still knows too much about the weather data and its origin.

Instant and Unlimited Access
to 400+ Cocoacasts Tutorials

Monthly

$19 / month

Pay Once a Month

Yearly

$8.25 / month (billed annually)

Pay Once a Year and Save 56%

Next Episode "Creating the Day and Week View Models"