views:

119

answers:

0

Hi folks, I've got a question on the conventional way to structure something similar to the following:

I have a screen which has a single line of data followed by a list of other data - and so I thought using a grouped UITableView with a single row'd section for the top and the rest in the section below would work well.

As I'm using CoreData to populate both pieces of data, and they would also have different fetchrequests - what is the best way to go about structuring this?

Would the various UITableView methods within the viewcontroller have to check which section/row is being passed in all the time?

How would I handle functions such as the below if I had multiple fetchedresultscontrollers for different sections/rows?

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     id <NSFetchedResultsSectionInfo> sectionInfo = [[fetchedResultsController sections] objectAtIndex:section];
    return [sectionInfo numberOfObjects];}

Or am I looking at this in completely the wrong way and should use a different solution?

Thanks.