---
title: "init(textAlignment:location:options:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/nstexttab/init(textalignment:location:options:)"
---

# init(textAlignment:location:options:)

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

## Declaration

```swift
init(textAlignment alignment: NSTextAlignment, location loc: CGFloat, options: [NSTextTab.OptionKey : Any] = [:])
```

## Parameters

- `alignment`: The alignment of the text.
- `loc`: The position of the text tab on the ruler, relative to the back margin.
- `options`: Options to apply to the text tab.

## Return Value

Return Value An initialized text tab.

## Discussion

Discussion The text alignment is used to determine the position of text inside the tab column. See NSParagraphStyle.TextTabType for a mapping between alignments and tab stop types
