Contents

NSKeyValueCoding

A mechanism by which you can access the properties of an object indirectly by name or key.

Overview

The basic methods for accessing an object’s values are setValue(_:forKey:), which sets the value for the property identified by the specified key, and value(forKey:), which returns the value for the property identified by the specified key. Thus, all of an object’s properties can be accessed in a consistent manner.

The default implementation relies on the accessor methods normally implemented by objects (or to access instance variables directly if need be).

Topics

Getting Values

Setting Values

Changing Default Behavior

Validation

Deprecated Methods

Constants

See Also

Related Documentation

  • Key-Value Coding Programming Guide

Key-Value Coding