NSTextTable
An object that represents a table of rows and columns in an attributed string.
Declaration
class NSTextTableMentioned in
Overview
NSTextTable is a subclass of NSTextBlock that represents a complete table. You can configure the number of columns, whether adjacent cell borders collapse into one, and whether empty cells are hidden.
Each cell is an NSTextTableBlock that specifies its row, column, and span within the table. You don’t add cells directly to the table — instead, you apply each cell’s block to a paragraph using textBlocks.
Choose between two layout algorithms using the layoutAlgorithm property:
NSTextTable.LayoutAlgorithm.automatic distributes column widths based on content, similar to the HTML
autotable layout.NSTextTable.LayoutAlgorithm.fixed distributes column widths based on explicit values set on the first row of cells, similar to the HTML
fixedtable layout.