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
func didSelectCell(viewModel: any CellViewModel)
Parameters
viewModel
The cell view model that corresponds to the cell.
-
underlyingViewController
Default 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
var underlyingViewController: UIViewController? { get }
-
underlyingViewController
Default implementationDefault Implementation
Default implementation if the conformer is a
UIViewController
. Returnsself
.Declaration
Swift
public var underlyingViewController: UIViewController? { get }