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 implementation

    Returns 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 }

Available where Self: UIViewController

  • underlyingViewController Default implementation

    Default Implementation

    Default implementation if the conformer is a UIViewController. Returns self.

    Declaration

    Swift

    public var underlyingViewController: UIViewController? { get }