Moving from a simple TableViewController based App to a Grid View (Similar to Flipboard) while maintaining CoreData and NSFetchedResultsController

StackOverflow https://stackoverflow.com/questions/19582521

Question

I am hard at work at my first app which is based around a simple TableViewController concept. It's using CoreData in the background, so when I press the ADD button, it brings up a ModalVC, the user adds in data, it gets added to the Entities and Attributes and that's then displayed in the TableViewCOntroller using the NSFetchedResultsController.

While that is sufficient for a template, I'm not happy with that UI for an actual release and what I want is someething closer to Flipboard, or the new iOS 7 only Cook App (iPad Only) with the Grids and that style of approach.

My question is, if I get the UI designed appropriately, can I use the grid approach in my app to replace the TableViewController, while maintaining my backend structure for CoreData and the efficiency of NSFetchedReusltsController. If so, any advice into how I approach this would be very much appreciated!

Was it helpful?

Solution

Take a look at UICollectionView. In general it works nicely with an NSFetchedResultsController. Beware however, that when starting out, just use the NSFetchedResultsDelegate method

- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller

Implementing the other method required some extra work as compared to a tableView, but I guess you first want it to just work with UICollectionView, so just use the 'hammer:

-reloadData 

on the collectionView in the FRCDelegate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top