I don’t undestand… i succeed in populate my table view but when i scroll it crash without message..
i create my tabQuestion with a NSMutablearray and then add this in my delegate : cellForRowAtIndexPath
NSDictionary *question = [self.tabQuestion objectAtIndex:indexPath.row];
[cell setAccessoryType: UITableViewCellAccessoryDisclosureIndicator];
cell.textLabel.text = [NSString stringWithFormat:@"%@", [question objectForKey:@"question"]];
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@", [question objectForKey:@"reponse"]];
if ([[question objectForKey:@"bOk"] isEqualToString:@"1"]) {
cell.imageView.image = [UIImage imageNamed:@"ok.png"];
}
else
{
cell.imageView.image = [UIImage imageNamed:@"ok.png"];
}
[question release];
return cell;
You shouldn’t
releaseobjects that were returned by methodobjectAtIndex:ofNSArray. It happens very rare.Try to remove first of all line:
[question release];Then check if your
self.tabQuestioncontains needful amount of objects.