Non reconnu Sélecteur Envoyé à l'Instance [NSCFString subarrayWithRange:]

J'ai le code suivant qui est de la production de cette erreur. Je ne comprends pas pourquoi le subarrayWithRange le message est envoyé à une chaîne de caractères? Quand il s'agit clairement d'un tableau?

static const int kItemsPerView = 20;
NSRange rangeForView = NSMakeRange( page * kItemsPerView, kItemsPerView );

NSMutableArray *temp = [[APP_DELEGATE keysArray] mutableCopyWithZone:NULL]; 
NSArray *itemsForView = [temp subarrayWithRange:rangeForView];

for (int loopCounter = 0;loopCounter < r*c;loopCounter++){
    NSLog(@"%i: %@ ", loopCounter, [itemsForView objectAtIndex:loopCounter]);
}

Erreur:

-[NSCFString subarrayWithRange:]: unrecognized selector sent to instance 0x6b071a0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: [NSCFString subarrayWithRange:]:

Grâce

OriginalL'auteur joec | 2010-10-04