title: How to initialize a NSFetchedResultsController in iOS 10 Swift 3
body: <p>I can't get my <code>NSFetchedResultsController</code> initialized in iOS 10 using Swift 3 within CoreDataTableViewController from <a href="https://github.com/tadija/AECoreDataUI" rel="nofollow noreferrer">AECoreDataUI</a>.</p>
  
  <pre><code>let request = NSFetchRequest&lt;NasaPicture&gt;(entityName:"NasaPicture")  
  request.predicate = Predicate(format: "isPagedResult == YES")  
  request.sortDescriptors = [SortDescriptor(key: "date", ascending: false)]  
  fetchedResultsController = NSFetchedResultsController(fetchRequest: request, managedObjectContext: moc, sectionNameKeyPath: nil, cacheName: nil)  
  </code></pre>
  
  <p>Compiler is complaining that </p>
  
  <pre><code>"Cannot convert value of type NSFetchedResultsController&lt;NasaPicture&gt; to expected type NSFetchedResultsController&lt;_&gt;"
  </code></pre>
  
  <p>The controller is now using generic type for swift, but it is not inferring the entity type correctly. I've tried explicitly:</p>
  
  <pre><code>fetchedResultsController = NSFetchedResultsController&lt;NasaPicture&gt;(fetchRequest: request, managedObjectContext: moc, sectionNameKeyPath: nil, cacheName: nil)  
  </code></pre>
  
  <p>No luck either.</p>
  
  <p>Thanks!</p>