Objective c nsmutabledictionary没有可见接口声明选择器setobject:forkey:
有人能指出我为什么会收到编译错误吗Objective c nsmutabledictionary没有可见接口声明选择器setobject:forkey:,objective-c,ios,nsmutabledictionary,Objective C,Ios,Nsmutabledictionary,有人能指出我为什么会收到编译错误吗 [objToSend setObject:self.pathidEdit forkey:@"PathId"]; [objToSend setObject:indexData forkey:@"data"]; 在下面的代码中 NSMutableArray *indexData = [[NSMutableArray alloc]init]; NSMutableDictionary *dict = [NSMutableDictionary dic
[objToSend setObject:self.pathidEdit forkey:@"PathId"];
[objToSend setObject:indexData forkey:@"data"];
在下面的代码中
NSMutableArray *indexData = [[NSMutableArray alloc]init];
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
NSMutableDictionary *objToSend = [NSMutableDictionary dictionary];
for(int i=0;i<myPathvideoArray.count;i++)
{
NSString *vId=[[myPathvideoArray objectAtIndex:i]valueForKey:@"videoId"];
NSNumber *indexNum = [NSNumber numberWithInt:i+1];
[dict setObject:vId forKey: @"VideoId"];
[dict setObject:indexNum forKey: @"index"];
[indexData addObject:dict];
}
[objToSend setObject:self.pathidEdit forkey:@"PathId"];
[objToSend setObject:indexData forkey:@"data"];
NSMutableArray*indexData=[[NSMutableArray alloc]init];
NSMutableDictionary*dict=[NSMutableDictionary];
NSMutableDictionary*objToSend=[NSMutableDictionary];
对于(int i=0;iObjective-C,区分大小写:
这是正确的:
[dict setObject:object forKey:key];
虽然这不是:
[dict setObject:object forkey:key];
Objective-C区分大小写:
这是正确的:
[dict setObject:object forKey:key];
虽然这不是:
[dict setObject:object forkey:key];
myPathvideoArray是字典数组?别管“forKey”的k是大写的…:D谢谢…lolmyPathvideoArray是字典数组?别管“forKey”的k我真的很抱歉发布了这样一个愚蠢的问题,但我的帐户从那时起就被否决了,我不能再问问题了。如果有人能把它投回去。我会确保我不会再发布这样的小问题!!非常感谢!再次为这个问题感到抱歉!大家好,我真的很抱歉很抱歉发布了这样一个愚蠢的问题,但我的帐户从那时起就被否决了,我不能再问问题了。如果有人能把它投回去。我会确保我不会再发布这样的小问题!!非常感谢!再次为这个问题道歉!