Learn how to create the Weather app's view controllers using storyboards and Swift.
- [Instructor] So, we tested the NetworkController…successfully, now we can integrate the method…in our ViewController.…I'm going to switch to the ViewController,…and the first thing we need…is to add a property that represents…the OpenWeatherMapNetworkController instance.…I'm going to make it private…because it should not be accessible…from other classes, from other parts of the application,…and I also make it lazy.…
Now lazy means that it's going to be initialized…when we access the property for the first time.…Let's call it controller, and its (mumbles),…OpenWeatherMapNetworkController,…and I instantiate it right away.…Again, this instance is going to be initialized…only when we first access it.…Next, I implement the missing functionality…and the textField should return Delegate method.…As you may remember, this Delegate method gets called…when the user taps the return key…after entering the city name.…
I'm going to invoke the fetchCurrentWeatherData method…on the controller instance,…controller.fetchCurrentWeatherData,…
- Comparing object-oriented programming with protocol-oriented programming
- Methods and class-bound protocols
- Adopting a protocol
- Declaring asynchronous behavior
- Preparing and implementing fallback logic
- Implementing an app using protocol-oriented programming
Skill Level Intermediate
1. Protocol-Oriented Programming
4. Implement the Weather App Using POP
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.