<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNText/alignmentMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNText(py)alignmentMode"
  },
  "title" : "alignmentMode"
}
-->

# alignmentMode

A constant that specifies how SceneKit horizontally aligns each line of text within its container.

```
var alignmentMode: String { get set }
```

## Discussion

When you define a layout rectangle for the text using its [`containerFrame`](/documentation/SceneKit/SCNText/containerFrame) property, SceneKit uses the [`alignmentMode`](/documentation/SceneKit/SCNText/alignmentMode) property to determine where each line of text is placed horizontally relative to the layout rectangle. For possible values, see <doc://com.apple.documentation/documentation/QuartzCore/horizontal-alignment-modes> in <doc://com.apple.documentation/documentation/QuartzCore/CATextLayer>.

The default value of this property is <doc://com.apple.documentation/documentation/QuartzCore/CATextLayerAlignmentMode/natural>, specifying that text is aligned relative to the default alignment of its script. (For example, left-to-right languages are left-aligned.)

---

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)