CoreData and UITableViewController Problem

Posted by eemceebee on Stack Overflow See other posts from Stack Overflow or by eemceebee
Published on 2010-06-01T20:35:09Z Indexed on 2010/06/01 21:03 UTC
Read the original article Hit count: 190

Hi

I have a app that works with Core Data. The data has a field with a date and I would like to show every entry of a month in a seperate section.

How do I actually get the data ? I use a NSFetchedResultsController to get the data and use this :

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
{

    id <NSFetchedResultsSectionInfo> sectionInfo = [[_fetchedResultsController sections] objectAtIndex:section];
    return [sectionInfo numberOfObjects];

}

to get the rows and this :

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
MyInfoObject *info = [_fetchedResultsController objectAtIndexPath:indexPath];
}

to get my actually data object.

Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableviewcontroller