valueForKey

NSOrderedSet

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

NSKeyValueCoding

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

NSSet

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

等等。。。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容