字典的基础操作

来源:互联网 发布:python股票交易策略 编辑:程序博客网 时间:2024/06/14 12:32
  1. //添加现有的字典数据  
  2.         [mutableDic addEntriesFromDictionary:dic3];  
  3.         NSLog(@"mutableDic :%@",mutableDic);  
  4.           
  5.         //添加新的键值对象  
  6.         [mutableDic setValue:@"set1" forKey:@"setKey1"];  
  7.         NSLog(@"set value for key :%@",mutableDic);  
  8.           
  9.         //以新的字典数据覆盖旧的字典数据  
  10.         [mutableDic setDictionary:dic2];  
  11.         NSLog(@" set dictionary :%@",mutableDic); 
0 0
原创粉丝点击