//创建一个空的字典
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
Student *stu1 = [Student studentWithName:@"stu1"];
Student *stu2 = [Student studentWithName:@"stu2"];
//添加元素
[dict setObject:sut1 forKey:@"k1"];
//删除所有的元素
[dict removeAllObjects];
//根据一个key删除一个元素
[dict removeObjectForKey:@"k1"];
//删除多个key对应的value
[dict removeObjectsForkey:[NSArray arrayWithObject:@"k1"] ];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
Student *stu1 = [Student studentWithName:@"stu1"];
Student *stu2 = [Student studentWithName:@"stu2"];
//添加元素
[dict setObject:sut1 forKey:@"k1"];
//删除所有的元素
[dict removeAllObjects];
//根据一个key删除一个元素
[dict removeObjectForKey:@"k1"];
//删除多个key对应的value
[dict removeObjectsForkey:[NSArray arrayWithObject:@"k1"] ];