J'ai ce petit problème que je n'ai pas pu trouver dans Google: UITableView
fonctionne très bien jusqu'à ce que je commence à défiler.- [NSCFString objectAtIndex:]: sélecteur non reconnu
Error Message: `-[NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x5f24870 `
Méthode:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
}
// Set up the cell
int storyIndex = [indexPath indexAtPosition: [indexPath length]-1];
//populate cell
cell.textLabel.text = [[myArray objectAtIndex: storyIndex] objectForKey: @"subject"];
return cell;
}
juste deviné qui était le -method "problème" ... si vous avez besoin de plus d'infos: s'il vous plaît me dire :) Merci pour votre aide!
EDIT: monTableau est juste le NSArray *myArray
normal, il est un tableau reclassées ->
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lesson" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
myArray = [resultArray sortedArrayUsingDescriptors:sortDescriptors];
resultArray (NSMutableArray) est le résultat d'un .. XML Parser espérons que vous pouvez voir mon problème ..
comment créer objet myArray? – Vladimir
merci pour le commentaire .. voir edit .. – dav3