title: Implement UITableViewDataSourcePrefetching with an NSFetchedResultsController data source
body: <p>I have a UITableView that gets data from an <code>NSFetchedResultsController</code>. To this end, i basically copied Apples example implementation from <a href="https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreData/nsfetchedresultscontroller.html" rel="noreferrer">https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreData/nsfetchedresultscontroller.html</a>.</p>
  
  <p>Now at WWDC16 Apple announced the <code>UITableViewDataSourcePrefetching</code> protocol, which provides callbacks that let you prefetch data so it's already loaded when it's needed to be displayed by the tableview. I'm looking for an example on how to integrate this with the <code>NSFetchedResultsController</code>, because i can't figure out if i'm doing this correctly.</p>
  
  <ul>
  <li>Should i simply create a dictionary, as an in-memory cache, to hold prefetched data and be used in <code>cellForRowAtIndexPath</code> instead of querying <code>fetchedResultsController.object(at: indexPath)</code> directly?</li>
  <li>As i understand it, CoreData already caches fetched data automatically, so maybe i just need to call <code>fetchedResultsController.object(at: indexPath)</code> in the prefetch callbacks, to ensure the data gets cached?</li>
  <li>Or shouldn't i prefetch data at all when using a fetched results controller, because i would work around the magical integration provided by Apple?</li>
  <li>Or something else entirely?</li>
  </ul>
  
  <p><strong>*edit*</strong>: I found a slide from the Core Data talk at WWDC16 that supposedly explains this, but i understand it at all.</p>
  
  <p><a href="https://i.stack.imgur.com/dcmQ7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dcmQ7.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>An async fetch request? I thought they don't work with <code>NSFetchedResultsController</code>. I guess that's why it's performed on the <code>managedObjectContext</code> directly?</li>
  <li>The async fetch request is created from the results of calling <code>.performFetch()</code> on the <code>NSFetchedResultsController</code>. Nothings showing up until i call that. But since all the results are there after calling it, i don't get why i would need to prefetch them again.</li>
  </ul>