I have
NSMutableDictionary *myDictionary = [[NSMutableDictionary alloc] init];
id dict = [myDictionary copy];
but is dict now just a regular NSDictionary? Or is it a copy of the NSMutableDictionary?
Also, is there any way to go from mutable to non-mutable?
There are two methods involved here;
-copyand-mutableCopy.If the class holds a distinction;
-copyalways creates an immutable copy; and-mutableCopyalways creates a mutable copy.If the class holds no distinction;
-copyalways creates a true copy.So yes, dict is now an NSDictionary, containing the objects in the dictionary.