代码改变世界

NSMutableDictionary中元素替换

2016-01-19 14:02  Y了个J  阅读(733)  评论(0编辑  收藏  举报

    NSMutableDictionary *dic = [NSMutableDictionary new];

    [dic addEntriesFromDictionary:@{@"key":@"12345"}];

     NSLog(@"%@",dic);

    [dic addEntriesFromDictionary:@{@"key":@"123"}];

    NSLog(@"%@",dic);

 

2016-01-19 14:09:18.068 nsdic[10029:277454] {

    key = 12345;

}

2016-01-19 14:09:18.068 nsdic[10029:277454] {

    key = 123;

}