<!--
{
  "availability" : [
    "macOS: 10.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextTab/init(type:location:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextTab(im)initWithType:location:"
  },
  "title" : "init(type:location:)"
}
-->

# init(type:location:)

Initializes a newly allocated text tab with the specified alignment and location.

```
convenience init(type: NSParagraphStyle.TextTabType, location loc: CGFloat)
```

## Discussion

The location is relative to the back margin, based on the line sweep direction of the paragraph. The value in the `type` parameter can be any of the values described in [`NSParagraphStyle.TextTabType`](/documentation/AppKit/NSParagraphStyle/TextTabType).

---

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)