Objective-C accès, de modification des éléments d'un tableau dans un tableau multidimensionnel (NSArray)

Je suis en train de modifier une valeur dans un tableau multidimensionnel mais l'acquisition d'une erreur de compilateur:

warning: passing argument 2 of 'setValue:forKey:' makes pointer from integer without a cast

C'est le contenu de mon tableau:

NSArray *tableContent = [[NSArray alloc] initWithObjects:
                [[NSArray alloc] initWithObjects:@"a",@"b",@"c",nil],
                [[NSArray alloc] initWithObjects:@"d",@"e",@"f",nil],
                [[NSArray alloc] initWithObjects:@"g",@"h",@"i",nil],
                 nil];

C'est de cette façon que je suis en train de modifier la valeur:

[[tableContent objectAtIndex:0] setValue:@"new value" forKey:1];

Solution:

 [[tableContent objectAtIndex:0] setValue:@"new val" forKey:@"1"];

Ainsi, le tableau de la clé est une chaîne de type un peu étrange, mais bon à savoir.

InformationsquelleAutor dan | 2010-01-18