//空的字典
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
//使用一个初始化指定的size创建可变字典
int size = 10 ;
NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:size];
NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithObjectsAndKeys: @"obj1", @"key1", @"obj2", @"key2", nil]; |
|