NSFetchedResultsController - reversed NSIndexPath with multiply sections and pagination
问题 To simplify my example, I develop ChatViewController where I need to display messages grouped into sections (one section for one day). I can load more messages swiping UITableView down. I need a pagination here. Messages are displayed from the oldest (top) to the latest (bottom of the table). The obvious is that I need to fetch messages sorted by createdAt property DESCENDING . So this is how I setup my NSFetcheResultsController on viewDidLoad() : private func setupFetchedResultsController()