diff --git a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate index 6001fb6e5fdffadcb9e1829483ef21900d492d98..8031045ddc2f493b9c844c0873fbfc0cb5191d58 100644 Binary files a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate index d05cb99ca8969543a5977d0b91942d8143d2d49a..5d3ae3b31a6a7a07aa3ca012fb6befd9dfbb34f3 100644 Binary files a/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m b/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m index f2f916e609a99f9de6c09e311c0ba38c6af77f90..6c5a38154f2122232c187f3bd4cd3303dbd1ef63 100644 --- a/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m +++ b/openbis-ipad/openBIS/openBIS/CISDOBMasterViewController.m @@ -102,6 +102,14 @@ return cell; } + +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { + + if (0 == section) return @"Target"; + if (1 == section) return @"Compound"; + return @""; +} + - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return NO; @@ -162,14 +170,15 @@ [fetchRequest setFetchBatchSize:20]; // Edit the sort key as appropriate. - NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"summaryHeader" ascending:NO]; - NSArray *sortDescriptors = @[sortDescriptor]; + NSSortDescriptor *entityTypeSortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"entityType" ascending:NO]; + NSSortDescriptor *summaryHeaderSortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"summaryHeader" ascending:NO]; + NSArray *sortDescriptors = @[entityTypeSortDescriptor, summaryHeaderSortDescriptor]; [fetchRequest setSortDescriptors:sortDescriptors]; // Edit the section name key path and cache name if appropriate. // nil for section name key path means "no sections". - NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:@"Master"]; + NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest: fetchRequest managedObjectContext: self.managedObjectContext sectionNameKeyPath: @"entityType" cacheName: @"Master"]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController;