I have a Core data with one entity named 'Cigarette' having a 'time' attribute. In my table View I have to populate each cell with total number of cigarettes for each day. How can this be done with NSFetchedResultsController ?
Apple have a sample app which demonstrates how to get an FRC to group items by date. Sadly it's an old app written in Objective-C, but this question shows broadly how to implement it in Swift.
You also need to modify the standard FRC tableView datasource methods and the FRC's own delegate methods, because rather than wanting a cell for each item, you want a cell for each "group" (ie. date).