TableSection
public struct TableSection : Sequence, TableSectionType
Defines the style, and state information of a section.
FunctionalTableData
deals in arrays of TableSection
instances. Each section, at a minimum, has a string value unique within the table itself, and an array of CellConfigType
instances that represent the rows of the section. Additionally there may be a header and footer for the section.
-
Declaration
Swift
public let key: String
-
Declaration
Swift
public var header: TableHeaderFooterConfigType?
-
Declaration
Swift
public var footer: TableHeaderFooterConfigType?
-
Declaration
Swift
public var rows: [CellConfigType]
-
Specifies visual attributes to be applied to the section. This includes row separators to use at the top, bottom, and between items of the section.
Declaration
Swift
public var style: SectionStyle?
-
Declaration
Swift
public var headerVisibilityAction: ((UIView, Bool) -> Void)?
-
Callback executed when a row is manually moved by the user. It specifies the before and after index position.
Declaration
Swift
public var didMoveRow: ((Int, Int) -> Void)?
-
Adds a row to the end of the array of rows.
Declaration
Swift
public mutating func append(_ row: CellConfigType)
Parameters
row
CellConfigType
instance to append the array of rows. -
Declaration
Swift
public func makeIterator() -> AnyIterator<CellConfigType>
-
Attempts to merge the separator’s style provided by a
TableSection
with the separator’s style provided by an instance ofCellConfigType
.Declaration
Swift
public func mergedStyle(for row: Int) -> CellStyle
Parameters
row
Integer identifying the position of the row in the section.
Return Value
The
CellStyle
of the cell merged with the style of the section.
-
Declaration
Swift
public static func == (lhs: TableSection, rhs: TableSection) -> Bool