TableSectionViewModel
public struct TableSectionViewModel : DiffableViewModelView model for a table view section.
- 
                  
                  Cells to be shown in this section. DeclarationSwift public let cellViewModels: [TableCellViewModel]
- 
                  
                  View model for the header of this section. DeclarationSwift public let headerViewModel: TableSectionHeaderFooterViewModel?
- 
                  
                  View model for the footer of this section. DeclarationSwift public let footerViewModel: TableSectionHeaderFooterViewModel?
- 
                  
                  The key used by the diffing algorithm to uniquely identify this section. If you are using automatic diffing on the TableViewDriver(which is enabled by default) you are required to provide a key that uniquely identifies this section.Typically you want to base this diffing key on data that is stored in the model. For example: public var diffingKey = { group.identifier }DeclarationSwift public var diffingKey: String
- 
                  
                  Returns trueif this section has zero cell view models,falseotherwise.DeclarationSwift public var isEmpty: Bool { get }
- 
                  
                  Initializes a TableSectionViewModel.DeclarationSwift public init( diffingKey: String?, cellViewModels: [TableCellViewModel], headerViewModel: TableSectionHeaderFooterViewModel? = nil, footerViewModel: TableSectionHeaderFooterViewModel? = nil )ParametersdiffingKeya Stringkey unique to this section that is used to diff sections automatically. Pass innilif you are not using automatic diffing on this collection.cellViewModelsThe cell view models contained in this section. headerViewModelA header view model for this section (defaults to nil).footerViewModelA footer view model for this section (defaults to nil).
- 
                  
                  Initializes a TableSectionViewModel.DeclarationSwift public init( diffingKey: String?, headerTitle: String?, headerHeight: CGFloat?, cellViewModels: [TableCellViewModel], footerTitle: String? = nil, footerHeight: CGFloat? = 0 )ParametersheaderTitleThe title for the header, or nil. Setting a title will cause a default header to be added to this section.headerHeightThe height of the default header, if one exists. cellViewModelsThe cell view models contained in this section. footerTitleThe title for the footer, or nil. Setting a title will cause a default footeer to be added to this section.footerHeightThe height of the default footer, if one exists. diffingKeyA diffing key. 
 View on GitHub
View on GitHub TableSectionViewModel Structure Reference
        TableSectionViewModel Structure Reference