ResultsControllerDelegate
public protocol ResultsControllerDelegate : AnyObject
The ResultsControllerDelegate defines methods that allow you to respond to changes in the results controller.
Use ResultChangeSet to easily track changes and apply them to a CollectionView
-
controllerDidLoadContent(controller:)Default implementationTells the delegate that the controller did load its initial content
Default Implementation
Declaration
Swift
func controllerDidLoadContent(controller: ResultsController)Parameters
controllerThe controller that loaded
-
Tells the delegate that the controller will change
Declaration
Swift
func controllerWillChangeContent(controller: ResultsController)Parameters
controllerThe controller that will change
-
Tells the delegate that the an object was changed
Declaration
Swift
func controller(_ controller: ResultsController, didChangeObject object: Any, at indexPath: IndexPath?, for changeType: ResultsControllerChangeType)Parameters
controllerThe controller
objectThe object that changed
indexPathThe source index path of the object
changeTypeThe type of change
-
Tells the delegate that a section was changed
Declaration
Swift
func controller(_ controller: ResultsController, didChangeSection section: Any, at indexPath: IndexPath?, for changeType: ResultsControllerChangeType)Parameters
controllerThe controller
sectionThe info for the updated section
indexPaththe source index path of the section
changeTypeThe type of change
-
Tells the delegate that it has process all changes
Declaration
Swift
func controllerDidChangeContent(controller: ResultsController)Parameters
controllerThe controller that was changed