Building a Weather Application From Scratch
Creating the Day and Week View Models
|2||Setting Up the Project 07:15|
|3||View Controller Containment 12:08|
|4||Fetching Weather Data 05:59|
|5||Removing Object Literals 07:54|
|6||Creating a View Model 13:09|
|7||Parsing the JSON Response 13:56|
|8||Handling Errors and Notifying the User 14:28|
|9||Adding Flexibility With Protocols 14:11|
|10||Creating the Day and Week View Models 07:33|
|11||Creating the User Interface of the Day View Controller 12:52|
|12||Organizing Fonts and Colors 06:45|
|13||Implementing the Day View Model 15:55|
|14||Writing Unit Tests for the Day View Model 12:57|
|15||Implementing the Week View Model 12:37|
|16||Writing Unit Tests for the Week View Model 07:10|
|17||Fetching Weather Data for the User's Location 13:32|
|18||Increasing Testability With Protocol-Oriented Programming 14:47|
|19||Replacing Optionals with Enums and Associated Values 09:30|
Before we can populate the day and week view controllers, we need to create a view model for each view controller. The view models transform the weather data into values the view controllers can present to the user. This is straightforward if you've watched the previous episodes. There are a few details that are worth pointing out, though.
Are you ready to step up your game?
Cocoacasts Plus helps Swift and Cocoa developers take their education serious without being overwhelmed.