value(forKey:)
Return a set containing the results of invoking valueForKey: on each of the receiving set’s members.
Declaration
func value(forKey key: String) -> AnyParameters
- key:
The name of one of the properties of the receiving set’s members.
Return Value
A set containing the results of invoking valueForKey: (with the argument key) on each of the receiving set’s members.
Discussion
The returned set might not have the same number of members as the receiving set. The returned set will not contain any elements corresponding to instances of valueForKey: returning nil (note that this is in contrast with NSArray’s implementation, which may put NSNull values in the arrays it returns).