Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Terminology

In addition to overloading existing terms, key-value coding defines some unique terminology of its own.

Key-value coding can be used to access three different types of object values: attributes, to-one relationships and to-many relationships. The term property refers to any of these types of values.

An attribute is a property that is a simple value, such as a scalar, string, or boolean value. Immutable objects such as NSColor and NSNumber are also considered attributes.

A property that specifies a to-one relationship is an object that has properties of its own. These underlying properties can change without the object itself changing. For example, an instance variable containing an NSMutableDictionary, would be a to-one relationship.

Finally, a property that specifies a to-many relationship consists of a collection of related objects. An instance of NSArray is commonly used to hold such a collection. However, key-value coding allows you to use custom classes for collections and still access them as if they were an NSArray by implementing the key-value coding accessors discussed in “Indexed Accessor Patterns for To-Many Properties.”



< Previous PageNext Page > Hide TOC


Last updated: 2007-06-06




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice