Find the best methods of passing data from one class to another in your iOS and OS X apps by using delegation, Notification Center, or key-value observation.
- [Voiceover] Hi there, I'm Ron Buencamino, and welcome to Communicating Between Classes with Objective-C. In this course, we'll take a look at communicating between objects in Cocoa, with Objective-C. In particular, we're going to discuss three different design patterns to accomplish this seemingly easy task. By using Key-Value Observation, otherwise known as KVO, Notification Center, and something very powerful, the Delegation Pattern.
Each of these patterns are unique ways to allow us to pass data between the objects we create in our apps. First, we're going to get an understanding of exactly what each of these patterns do for us. We'll look at examples of how they are implemented, as well as their strengths, weaknesses, and in what situations you'd want to implement one over the other. Then, we'll be creating an app that puts each of them to the test, so that you can see how they can be used in your future projects.
The patterns that we will discuss can be used across both your iOS, and OS X projects. So let's get started.