Created
December 30, 2020 04:22
-
-
Save zentrope/67f8429543359a6c85268f93a093eccc to your computer and use it in GitHub Desktop.
Fetch controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func usersFetchController() -> NSFetchedResultsController<FKUser> { | |
let fetcher: NSFetchRequest = FKUser.fetchRequest() | |
fetcher.sortDescriptors = [ NSSortDescriptor(key: "id", ascending: false) ] | |
return NSFetchedResultsController(fetchRequest: fetcher, managedObjectContext: viewContext, sectionNameKeyPath: nil, cacheName: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment