CellEventCoordinator
@MainActor
public protocol CellEventCoordinator : AnyObject
Conforming objects are responsible for handling various cell events.
-
didSelectCell(viewModel:Default implementation) Called when a cell is selected.
Default Implementation
Default implementation. Does nothing.
Declaration
Swift
@MainActor func didSelectCell(viewModel: any CellViewModel)Parameters
viewModelThe cell view model that corresponds to the cell.
-
didDeselectCell(viewModel:Default implementation) Called when a cell is deselected.
Default Implementation
Default implementation. Does nothing.
Declaration
Swift
@MainActor func didDeselectCell(viewModel: any CellViewModel)Parameters
viewModelThe cell view model that corresponds to the cell.
-
underlyingViewControllerDefault implementationReturns the underlying view controller that owns the collection view for the cell.
You may use this to optionally handle navigation within your cell view model.
Default Implementation
Default implementation. Returns
nil.Declaration
Swift
@MainActor var underlyingViewController: UIViewController? { get }
-
underlyingViewControllerDefault implementationDefault Implementation
Default implementation if the conformer is a
UIViewController. Returnsself.Declaration
Swift
@MainActor public var underlyingViewController: UIViewController? { get }
View on GitHub