AnySupplementaryViewModel

public struct AnySupplementaryViewModel : SupplementaryViewModel
extension AnySupplementaryViewModel: Equatable
extension AnySupplementaryViewModel: Hashable
extension AnySupplementaryViewModel: CustomDebugStringConvertible

A type-erased supplementary view model.

Note

When providing supplementary views with mixed data types to a SectionViewModel, it is necessary to convert them to AnySupplementaryViewModel.

Init

  • Initializes an AnySupplementaryViewModel from the provided supplementary view model.

    Declaration

    Swift

    public init<T>(_ viewModel: T) where T : SupplementaryViewModel

    Parameters

    viewModel

    The view model to type-erase.