FetchedResultsController

public class FetchedResultsController<T> : NSFetchedResultsController<NSFetchRequestResult> where T : NSFetchRequestResult
extension FetchedResultsController: DataSourceProtocol

A generic NSFetchedResultsController.

  • Returns a fetch request controller initialized using the given arguments.

    Declaration

    Swift

    public init<T>(fetchRequest: NSFetchRequest<T>,
                   managedObjectContext context: NSManagedObjectContext,
                   sectionNameKeyPath: String?,
                   cacheName name: String?)

    Parameters

    fetchRequest

    The fetch request used to get the objects.

    context

    The managed object against which fetchRequest is executed.

    sectionNameKeyPath

    A key path on result objects that returns the section name.

    name

    The name of the cache file the receiver should use.

    Return Value

    An initialized fetch request controller.

  • Declaration

    Swift

    public subscript(indexPath: IndexPath) -> T { get }

    Parameters

    indexPath

    The index path of an object.

    Return Value

    The object at indexPath.