方法调用的参数太多,预期为1,有2个有9个

时间:2017-06-19 11:35:19

标签: objective-c xcode nsmutablearray

NSMutableDictionary * dictdata = [[NSMutableDictionary alloc] init];

[dictdata setObject:plant forKey:@“zoneName”,@“LAS”,@“searchPlant”,@“SantaCruz”,@“monthNo”,@“10”,@“year”,@“2016”] ;

1 个答案:

答案 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"];