值/对象的NSDictionary键? [英] NSDictionary Key For Value/Object?
本文介绍了值/对象的NSDictionary键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以通过传递特定的值或对象来获取 NSDictionary
中的对象的键吗?
Can we get the key for an object in an NSDictionary
by passing a particular value or object?
推荐答案
- [NSDictionary allKeysForObject:]
返回 NSArray
所有其对象与所传递的对象匹配的键,其中匹配由 isEqual:
确定。
-[NSDictionary allKeysForObject:]
returns an NSArray
of all the keys whose objects match the passed object, where "match" is determined by isEqual:
.
这篇关于值/对象的NSDictionary键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文