Contents

value(forKey:)

Returns the value for the property identified by a given key.

Declaration

func value(forKey key: String) -> Any?

Parameters

  • key:

    The name of one of the receiver’s properties.

Return Value

The value for the property identified by key.

Discussion

The search pattern that valueForKey: uses to find the correct value to return is described in Accessor Search Patterns in Key-Value Coding Programming Guide.

See Also

Related Documentation

  • Key-Value Coding Programming Guide

Getting Values