The CTTextTab opaque type represents a tab in a paragraph style, storing an alignment type and location.


Core Text supports four alignment types: left, center, right, and decimal. These alignment types are absolute, not based on the line sweep direction of text. For example, tabbed text is always positioned to the left of a right-aligned tab, whether the line sweep direction is left to right or right to left. A tab's location, on the other hand, is relative to the back margin. A tab set at 1.5 inches, for example, is at 1.5 inches from the right in right-to-left text.


Creating Text Tabs

Getting Text Tab Data

func CTTextTabGetAlignment(CTTextTab) -> CTTextAlignment

Returns the text alignment of the tab.

func CTTextTabGetLocation(CTTextTab) -> Double

Returns the tab's ruler location.

func CTTextTabGetOptions(CTTextTab) -> CFDictionary?

Returns the dictionary of attributes associated with the tab.

Getting the Type Identifier

func CTTextTabGetTypeID() -> CFTypeID

Returns the Core Foundation type identifier of the text tab object.

Data Types

class CTTextTab

A reference to a text tab object.



Specifies the terminating character for a tab column.

See Also

Opaque Types


The CTFont opaque type represents a Core Text font object. Font objects represent fonts to an application, providing access to characteristics of the font, such as point size, transform matrix, and other attributes. Fonts provide assistance in laying out glyphs relative to one another and are used to establish the current font when drawing in a graphics context.


The CTFontCollection opaque type represents a font collection, that is, a group of font descriptors taken together as a single object.


The CTFontDescriptor opaque type represents a font descriptor, that is, a dictionary of attributes (such as name, point size, and variation) that can completely specify a font.


The CTFrame opaque type represents a frame containing multiple lines of text. The frame object is the output resulting from the text-framing process performed by a framesetter object.


The CTFramesetter opaque type is used to generate text frames. That is, CTFramesetter is an object factory for CTFrame objects.


The CTGlyphInfo opaque type enables you to override a font's specified mapping from Unicode to the glyph ID.


The CTLine opaque type represents a line of text.


The CTParagraphStyle opaque type represents paragraph or ruler attributes in an attributed string.


The CTRun opaque type represents a glyph run, which is a set of consecutive glyphs sharing the same attributes and direction.


The CTRunDelegate opaque type represents a run delegate, which is assigned to a run (attribute range) to control typographic traits such glyph ascent, glyph descent, and glyph width.


The CTTypesetter opaque type represents a typesetter, which performs line layout.