Skip to content
Snippets Groups Projects
Commit e28ef427 authored by cramakri's avatar cramakri
Browse files

Dynamically determine group names

SVN: 27106
parent a3473c22
No related branches found
No related tags found
No related merge requests found
......@@ -104,12 +104,13 @@
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex: section];
NSArray *objects = [sectionInfo objects];
if ([objects count] < 1) return @"";
// TODO This should not be hard coded
if (0 == section) return @"Target";
if (1 == section) return @"Compound";
return @"";
return ((CISDOBIpadEntity *)[objects objectAtIndex: 0]).group;
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment