CoreDataMultiFetchedResultsController
@objc public class CoreDataMultiFetchedResultsController: NSObject - A CoreDataMultiFetchedResultsControllerallows to fetch objects with a fetch request across multipleNSManagedObjectContextinstances.
- It can be useful when getting results out of a shared synchronizer, since objects from different record zones will be kept in different Core Data contexts.
Inheritance#
NSObject
Initializers#
init(stackProvider:fetchRequest:)#
Createa a new controller with results from the contexts in the given stack provider.
@objc public init(stackProvider: DefaultCoreDataStackProvider, fetchRequest: NSFetchRequest<NSFetchRequestResult>) Parameters#
- stackProvider: The Core Data stack provider that contains the contexts to get results from.
- fetchRequest: Fetch request to use to with Core Data to get the objects.
Properties#
delegate#
A delegate to be called when the internal controllers change as a result of new shared being accepted/removed.
@objc public weak var delegate: CoreDataMultiFetchedResultsControllerDelegate?fetchedResultsControllers#
List of NSFetchedResultsController used to get the results.
@objc public private(set) var fetchedResultsControllers: [NSFetchedResultsController<NSFetchRequestResult>]!fetchRequest#
Fetch request used to get the results.
@objc public let fetchRequest: NSFetchRequest<NSFetchRequestResult>provider#
DefaultCoreDataStackProvider linked to this controller. This is the object that provides a new Core Data stack to the synchronizer when a new record zone is added to it –user accepted a share, for example.
@objc public let provider: DefaultCoreDataStackProvider