Contents

mutableArrayValue(forKey:)

Returns a mutable array proxy that provides read-write access to an ordered to-many relationship specified by a given key.

Declaration

func mutableArrayValue(forKey key: String) -> NSMutableArray

Parameters

  • key:

    The name of an ordered to-many relationship.

Return Value

A mutable array proxy that provides read-write access to the ordered to-many relationship specified by key.

Discussion

Objects added to the mutable array become related to the receiver, and objects removed from the mutable array become unrelated. The default implementation recognizes the same simple accessor methods and array accessor methods as value(forKey:), and follows the same direct instance variable access policies, but always returns a mutable collection proxy object instead of the immutable collection that value(forKey:) would return.

The search pattern that mutableArrayValueForKey: uses is described in Accessor Search Patterns in Key-Value Coding Programming Guide.

See Also

Getting Values