I am trying to understand exactly what is going on with this method, as noted in the Apple docs:
If I create an NSMutableDicationary and use addEntriesFromDictionary: to fill it, can I do anything I want to this mutable dictionary without affecting the original immutable dictionary from where these items came?
The original dictionary will not be modified. However, if the keys or values of the original dictionary are themselves mutable in some way (e.g. they’re instances of
UIVieworNSMutableArray) and you modify them, the changes will be reflected in the original dictionary.To avoid that, make a deep copy of the original dictionary before adding it to the new dictionary: