Instance Method

setValue(_:forKey:)

Invokes setValue(_:forKey:) on each of the array's items using the specified value and key.

Declaration

func setValue(_ value: Any?, forKey key: String)

Parameters

value

The object value.

key

The key to store the value.

See Also

Key-Value Coding

func value(forKey: String)

Returns an array containing the results of invoking value(forKey:) using key on each of the array's objects.