Structures

The following structures are available globally.

  • A type-erased cell view model.

    Note

    When providing cells with mixed data types to a SectionViewModel, it is necessary to convert them to AnyCellViewModel.
    See more

    Declaration

    Swift

    @MainActor
    public struct AnyCellViewModel : CellViewModel
    extension AnyCellViewModel: Equatable
    extension AnyCellViewModel: Hashable
    extension AnyCellViewModel: CustomDebugStringConvertible
  • Defines various options to customize behavior of a CollectionViewDriver.

    See more

    Declaration

    Swift

    public struct CollectionViewDriverOptions : Hashable
  • Represents a collection view with sections and items.

    See more

    Declaration

    Swift

    @MainActor
    public struct CollectionViewModel : Hashable, DiffableViewModel
    extension CollectionViewModel: Collection, RandomAccessCollection
    extension CollectionViewModel: CustomDebugStringConvertible
  • Provides an “empty state” or “no content” view for the collection view.

    See more

    Declaration

    Swift

    @MainActor
    public struct EmptyViewProvider
  • Represents a section of items in a collection.

    See more

    Declaration

    Swift

    @MainActor
    public struct SectionViewModel : DiffableViewModel
    extension SectionViewModel: Collection, RandomAccessCollection
    extension SectionViewModel: 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.
    See more

    Declaration

    Swift

    @MainActor
    public struct AnySupplementaryViewModel : SupplementaryViewModel
    extension AnySupplementaryViewModel: Equatable
    extension AnySupplementaryViewModel: Hashable
    extension AnySupplementaryViewModel: CustomDebugStringConvertible
  • Describes all information needed to register a view for reuse with a UICollectionView.

    See more

    Declaration

    Swift

    @MainActor
    public struct ViewRegistration : Hashable