Tag Archives: keys

Custom objects as NSDictionary keys

This post describes what is needed for any class to work as a key of NSDictionary or NSMutableDictionary. The only thing that is really required is that your class adopt the NSCopying protocol.  That’s because every key is copied before being added to the dictionary.  I mention why this design decision was probably made below. […]