loom & weft
Made for Swift.

Published release 0.2.1. Unreleased PR #2 reference.

LOOM 0.2.1 / COLLECTIONS AND INTERACTION

TableCell

A styled table cell.

Text wraps within its column and clips to its row's explicit height.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Members on this page

Feature guides and release status

TableCell

Structure
struct TableCell

Conforms to: Swift.Sendable, Swift.SendableMetatype.

A styled table cell.

Text wraps within its column and clips to its row's explicit height.

Source · Table.swift:4

spans

Instance Property
var spans: [TextSpan]

A public field of this type. Its value type and mutability are shown in the declaration.

Source · Table.swift:5

alignment

Instance Property
var alignment: CellAlignment?

A public field of this type. Its value type and mutability are shown in the declaration.

Source · Table.swift:6

init(_:style:alignment:)

Initializer
init(_ text: String, style: Style? = nil, alignment: CellAlignment? = nil)

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (3)
text
Source text.
style
Text/cell appearance.
alignment
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · Table.swift:8

init(spans:alignment:)

Initializer
init(spans: [TextSpan], alignment: CellAlignment? = nil)

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (2)
spans
Styled source spans, in order.
alignment
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · Table.swift:12