Can we get the key for an object in an NSDictionary
by passing a particular value or object?
NSDictionary / NSMutableDictionary copies keys, and holds strong references to values.
An NSDictionary will retain it's objects, and copy it's keys.
You have to convert NSDictionary to NSMutableDictionary . You have to user NSMutableDictionary in place of the NSDictionary . After that you can able to change value in NSMutableDictionary .
An object representing a static collection of key-value pairs, for use instead of a Dictionary constant in cases that require reference semantics.
-[NSDictionary allKeysForObject:]
returns an NSArray
of all the keys whose objects match the passed object, where "match" is determined by isEqual:
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With