An object that represents a text table as a whole.


class NSTextTable : NSTextBlock


A text table is responsible for laying out and drawing the text table blocks it contains, and it maintains the basic parameters of the table.


Getting and setting number of columns

var numberOfColumns: Int

The number of columns in the text table.

Getting and setting layout algorithm

var layoutAlgorithm: NSTextTable.LayoutAlgorithm

The text table layout algorithm.

Collapsing borders

var collapsesBorders: Bool

A Boolean value indicating whether the text table borders are collapsible.

Hiding empty cells

var hidesEmptyCells: Bool

A Boolean value indicating whether the text table hides empty cells.

Determining layout rectangles

func boundsRect(for: NSTextTableBlock, contentRect: NSRect, in: NSRect, textContainer: NSTextContainer, characterRange: NSRange) -> NSRect

Returns the rectangle the text table block actually occupies, including padding, borders, and margins.


enum NSTextTable.LayoutAlgorithm

These constants, specifying the type of text table layout algorithm, are used with layoutAlgorithm.


Inherits From

Conforms To

See Also

Formatted Content

class NSTextBlock

A block of text laid out in a subregion of the text container.

class NSParagraphStyle

The paragraph or ruler attributes used by an attributed string.

class NSMutableParagraphStyle

An object that enables changing the values of the subattributes in a paragraph style attribute.

class NSTextTableBlock

A text block that appears as a cell in a text table.

class NSTextTab

A tab in an NSParagraphStyle object, storing an alignment type and location.

class NSTextList

A section of text that forms a single list.