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 ...

Get MacRuby in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.