我有一个NSDicitonary
,我把它转换成NSMutableDictionary
. 我正在尝试在 中进行更改NSMutableDictionary
,现在我如何才能在 中影响这些更改NSDictionary
?
NSDictionary *dct=[[NSDictionary alloc] initWithObjectsAndKeys:@"varun",@"name",@"9703507750",@"mobileNo",nil];
NSLog(@"dct : %@",dct);
dctMute=[[NSMutableDictionary alloc] init];
dctMute=[dct mutableCopy];
NSLog(@"dctMute : %@",dctMute);
[dctMute setObject:@"hyderabad" forKey:@"city"];
[dctMute setObject:@"varun kumar" forKey:@"name"];
NSLog(@"dctMute after adding city: %@",dctMute);