O'Reilly logo

MacRuby in Action by Brendan G. Lim with Jerry Cheung and Jeremy McAnally

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Using key-value coding and key-value observing

 

This chapter covers
  • Learning key-value coding (KVC)
  • Tying KVC to the UI
  • Using key-value observing (KVO)

 

Throughout this book you’ve called getter and setter methods to retrieve or modify attributes of object instance variables. Using a mechanism called key-value coding (KVC), you can manipulate object properties indirectly. With KVC comes the ability to observe changes to a particular key value, which is known as key-value observing (KVO). These two concepts go hand-in-hand and are the building blocks of other Cocoa frameworks, such as Core Data, which we’ll cover in chapter 7.

In this chapter we’ll introduce KVC and KVO and walk you through the process of building a MacRuby application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required