ループ内にこのようなデータ構造があります。生成された配列のコンテンツであるself.practiceは、tableviewControllerの動的テーブルビューに入力する必要があります。
// new NSDictionary
NSDictionary *highway = [[NSDictionary alloc] initWithObjectsAndKeys:@"Highway", @"description",
@"H", @"namekey",
[NSString stringWithFormat:@"%i", aHours], @"hours",
aHoursDefault.stringValue, @"hoursdefault",
[self.classlist objectAtIndex:i], @"driverclass",
nil];
NSDictionary *freeway = [[NSDictionary alloc] initWithObjectsAndKeys:@"Freeway", @"description",
@"F", @"namekey",
[NSString stringWithFormat:@"%i", fHours], @"hours",
fHoursDefault.stringValue, @"hoursdefault",
[self.classlist objectAtIndex:i], @"driverclass",
nil];
NSDictionary *stateHigway = [[NSDictionary alloc] initWithObjectsAndKeys:@"stateHighway", @"description",
@"S", @"namekey",
[NSString stringWithFormat:@"%i", sHours], @"hours",
sHoursDefault.stringValue, @"hoursdefault",
[self.classlist objectAtIndex:i], @"driverclass",
nil];
// Values of Dictionary assign to array
[self.practiceOverviewData addObject:highway];
[self.practiceOverviewData addObject:freeway];
[self.practiceOverviewData addObject:stateHighway];
// put those arrays in the "Big Array" for my tableview
[self.practice addObject:self.practiceOverviewData];
現在、cellForRowAtIndexPathにあります。内部配列からキー値にアクセスできません。
cell.textLabel.text = [[self.practice objectAtIndex:indexPath.row] objectForKey:@"description"];