0

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!

amitsbajaj
  • 1,304
  • 1
  • 24
  • 59

1 Answers1

1

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.

Joride
  • 3,722
  • 18
  • 22
  • Dear Joride, thanks very much for your reply. This is exactly what I needed; I wasn't sure what class I would/could use for something like this but now having searched up on UICollectionView from your post, I can see some typical examples of getting this working appropriately. Thanks again! – amitsbajaj Oct 25 '13 at 06:52
  • If UICollectionView is really new, it might be useful to watch the WWDC 2012 Session videos on them (there are two). There is also great sample code in the Apple Developer central: https://developer.apple.com/videos/wwdc/2012/ – Joride Oct 25 '13 at 07:01
  • That's brilliant - thanks very much Joride - I was thinking the WWDC would be a good place to start with an introduction to UICollectionView and I can see that Ray Wenderlich has some great tutorials as well, but thanks again for the link - massive help! and massively appreicated! – amitsbajaj Oct 25 '13 at 07:03