ResultsController
public protocol ResultsController : AnyObject
A ResultsController manages data in a way that is usable by a collection view.
- FetchedResultsController
- RelationalResultsController
-
The delegate to notify about data changes
Declaration
Swift
var delegate: ResultsControllerDelegate? { get set }
-
The number of sections in the results controller
Declaration
Swift
var numberOfSections: Int { get }
-
Returns the number of objects in the specified section
Declaration
Swift
func numberOfObjects(in section: Int) -> Int
Parameters
section
The section for which to count the objects
Return Value
The number of objects
-
The name of the section at the specfied section
Note
The object represented by the section must adopt CustomDisplayStringConvertible, otherwise this returns an empty string
Declaration
Swift
func sectionName(forSectionAt indexPath: IndexPath) -> String
Return Value
A string representing the name of the section
-
Clear all storage for the controller and stop all observing
Declaration
Swift
func reset()