ios - How to get the object from a dictionary for a key that is an NSObject? -
likely there posts dealing issue, i'm not able find want... i've nsmutabledictionary
keys subclass of nsobject<nscopying>
. i'm finding objectforkey:
not working, i'm getting nil
if use same key object i've used calling setobject:forkey:
.
what best way handle should be?
when call setobject:forkey:
key copied, dictionary doesn't key object itself. that's why getting nil when call objectforkey:
.
you need implement -(bool)isequal:(id)anobject
.
Comments
Post a Comment