NSMutableDictionary * dictdata = [[NSMutableDictionary alloc] init];
[dictdata setObject:plant forKey:@“zoneName”,@“LAS”,@“searchPlant”,@“SantaCruz”,@“monthNo”,@“10”,@“year”,@“2016”] ;
答案 0 :(得分:1)
NSMutableDictionary *dictdata= [[NSMutableDictionary alloc]init];
[dictdata setObject:@"LAS" forKey:@"zoneName"];
[dictdata setObject:@"SantaCruz" forKey:@"searchPlant"];
[dictdata setObject:@"10" forKey:@"monthNo"];
[dictdata setObject:@"2016" forKey:@"year"];
键:像这样在字典中设置的值
如果您使用任何值:
NSString *yearString = [dictdata objectForKey:@"year"];