---
title: "CTTextTabCreate(_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/cttexttabcreate(_:_:_:)"
---

# CTTextTabCreate(_:_:_:)

Creates and initializes a new text tab object.

## Declaration

```swift
func CTTextTabCreate(_ alignment: CTTextAlignment, _ location: Double, _ options: CFDictionary?) -> CTTextTab
```

## Parameters

- `alignment`: The tab’s alignment. This is used to determine the position of text inside the tab column. This parameter must be set to a valid doc://com.apple.coretext/documentation/CoreText/CTTextAlignment value or this function returns NULL.
- `location`: The tab’s ruler location, relative to the back margin.
- `options`: Options to pass in when the tab is created. Currently, the only option available is doc://com.apple.coretext/documentation/CoreText/kCTTabColumnTerminatorsAttributeName. This parameter is optional and can be set to NULL if not needed.

## Return Value

Return Value A reference to a CTTextTab object if the call was successful; otherwise, NULL.

## See Also

### Creating Text Tabs

- [kCTTabColumnTerminatorsAttributeName](coretext/kcttabcolumnterminatorsattributename.md)
