<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSTextTab",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextTab"
  },
  "title" : "NSTextTab"
}
-->

# NSTextTab

A tab in a paragraph.

```
class NSTextTab
```

## Overview

A text tab represents a tab in an [`NSParagraphStyle`](/documentation/UIKit/NSParagraphStyle) object, storing an alignment type and location. [`NSTextTab`](/documentation/UIKit/NSTextTab) objects are most frequently used with the TextKit system and with <doc://com.apple.documentation/documentation/AppKit/NSRulerView> and <doc://com.apple.documentation/documentation/AppKit/NSRulerMarker> objects.

The text system supports four alignment types: left, center, right, and decimal (based on the decimal separator character of the locale in effect). 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”, for example, is at 1.5” from the right in right to left text.

## Topics

### Creating a text tab

[`-  initWithTextAlignment:location:options:`](/documentation/UIKit/NSTextTab/init(textAlignment:location:options:))

Initializes a text tab with the specified text alignment, location, and options.

### Getting tab stop information

[`location`](/documentation/UIKit/NSTextTab/location)

The text tab’s ruler location relative to the back margin.

### Getting text tab information

[`alignment`](/documentation/UIKit/NSTextTab/alignment)

The text alignment of the text tab.

[`options`](/documentation/UIKit/NSTextTab/options)

The dictionary of attributes for the text tab.

[`+  columnTerminatorsForLocale:`](/documentation/UIKit/NSTextTab/columnTerminators(for:))

Returns the column terminators for the specified locale.

### Constants

  <doc://com.apple.documentation/documentation/AppKit/NSParagraphStyle/TextTabType>

[`OptionKey`](/documentation/UIKit/NSTextTab/OptionKey)

The terminating character for a tab column.

### Deprecated

  <doc://com.apple.documentation/documentation/AppKit/NSTextTab/init(type:location:)>

  <doc://com.apple.documentation/documentation/AppKit/NSTextTab/tabStopType>

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCoding`](/documentation/Foundation/NSCoding)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)