Alek Åström wrote a nice article about using
NSFetchedResultsController in Swift. He explains how implement fluid and intuitive user interface that takes advantage of that class. There is also an example ToDo app that follows his idea.
One of my absolute favorite classes in the Cocoa Touch framework is NSFetchedResultsController, because it makes data driven animations so easy to implement. Moving things around is how we organize in the physical world, which is why spatial position and animation of it is such an intuitive metaphor for dealing with digital objects.
In this post, I will show you how to push NSFetchedResultsController to and beyond its limits to achieve a fluid and intuitive user interface for organizing things in a table view. These are the topics we are going to cover:
- Using a meta data entity for fetching
- Arbitrary section ordering
- Animating between different grouping of data
- Semantic drag 'n' drop
- Showing empty sections through a proxy