2

コンパイルエラーが発生する理由を誰でも指摘できますか

[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"];
4

1 に答える 1

5

Objective-Cでは大文字と小文字が区別されます。

正解です:

[dict setObject:object forKey:key];

これはそうではありませんが:

[dict setObject:object forkey:key];
于 2012-08-30T17:40:28.397 に答える