Dans le code suivant, j'ai déterminé que tout fonctionnait, jusqu'à ce que [tableView reloadData] ait des NSLOGs configurés dans les méthodes déléguées de la vue tableau et qu'aucun d'entre eux ne soit appelé. J'ai d'autres méthodes faisant le même reloadData et cela fonctionne parfaitement. La seule différence que je sors est que c'est dans un bloc @catch. vous les gars intelligents peuvent peut-être voir quelque chose que je fais mal ...iphone reload tableView
@catch (NSException * e) {////chart is user genrated
logoView.image = nil;
NSInteger row = [picker selectedRowInComponent:0];
NSString *selectedAircraft = [aircraft objectAtIndex:row];
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *docsPath = [paths objectAtIndex:0];
NSString *checklistPath = [[NSString alloc]initWithFormat:@"%@/%@.checklist",docsPath,selectedAircraft];
NSString *dataString = [NSString stringWithContentsOfFile:checklistPath encoding: NSUTF8StringEncoding error:NULL];
if ([dataString hasPrefix:@"\n"]) {
dataString = [dataString substringFromIndex:1];
}
NSArray *tempArray = [dataString componentsSeparatedByString:@"\n"];
NSDictionary *temporaryDictionary = [NSDictionary dictionaryWithObject: tempArray forKey:@"User Generated Checklist"];
self.names = temporaryDictionary;
NSArray *tempArray2 = [NSArray arrayWithObject:@"01User Generated Checklist"];
self.keys = tempArray2;
aircraftLabel.text = selectedAircraft;
checklistSelectPanel.hidden = YES;
[tableView reloadData];
}
Ce ne sera probablement pas aider, mais juste par curiosité, avez-vous essayé d'utiliser 'self.tableView' au lieu de' tableView'? – shosti