Returns an ordered set containing the results of invoking valueForKey:using key on each of the ordered set’s objects.
https://developer.apple.com/documentation/foundation/nsorderedset/1409378-valueforkey?language=occ
Returns the value for the property identified by a given key.
https://developer.apple.com/documentation/objectivec/nsobject/1412591-valueforkey?language=occ
NSArray
Returns an array containing the results of invoking valueForKey: using keyon each of the array's objects.
Discussion
The returned array contains NSNull elements for each object that returns nil.
https://developer.apple.com/documentation/foundation/nsarray/1412219-valueforkey?language=occ
NSDictionary
Returns the value associated with a given key.
https://developer.apple.com/documentation/foundation/nsdictionary/1410210-valueforkey?language=occ
Return a set containing the results of invoking valueForKey: 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).
https://developer.apple.com/documentation/foundation/nsset/1418386-valueforkey?language=occ
等等。。。
网友评论