I have one NSMutableDictionary.
NSMutableDictionary * dict = @{
@"0" : @"car",
@"1" : @"ball",
@"2" : @"plane",
}
At some point, by mistake, I assigned a zero to a dictionary element. For example:
dict[@"1"] = nil;
for my surprise, instead of crashing, element "1" is deleted.
Is this something recent? authorized function or error? I wonder if this is a feature because I always used something like
[dict removeObjectForKey:@"1"];
Removing objects from dictionaries.
I never knew this was possible. Perhaps Apple is making Objective-C look like Swift.
source
share