---
title: NSTextLayoutManager.SegmentOptions
framework: uikit
role: symbol
role_heading: Structure
path: uikit/nstextlayoutmanager/segmentoptions
---

# NSTextLayoutManager.SegmentOptions

Values that describe where and how the framework extends segments of a selection.

## Declaration

```swift
struct SegmentOptions
```

## Topics

### Creating segment options

- [init(rawValue:)](uikit/nstextlayoutmanager/segmentoptions/init(rawvalue:).md)

### Getting segment options

- [headSegmentExtended](uikit/nstextlayoutmanager/segmentoptions/headsegmentextended.md)
- [middleFragmentsExcluded](uikit/nstextlayoutmanager/segmentoptions/middlefragmentsexcluded.md)
- [rangeNotRequired](uikit/nstextlayoutmanager/segmentoptions/rangenotrequired.md)
- [tailSegmentExtended](uikit/nstextlayoutmanager/segmentoptions/tailsegmentextended.md)
- [upstreamAffinity](uikit/nstextlayoutmanager/segmentoptions/upstreamaffinity.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Causing layout generation

- [textViewportLayoutController](uikit/nstextlayoutmanager/textviewportlayoutcontroller.md)
- [invalidateLayout(for:)](uikit/nstextlayoutmanager/invalidatelayout(for:).md)
- [textLayoutFragment(for:)](uikit/nstextlayoutmanager/textlayoutfragment(for:)-68dez.md)
- [textLayoutFragment(for:)](uikit/nstextlayoutmanager/textlayoutfragment(for:)-4dhrx.md)
- [ensureLayout(for:)](uikit/nstextlayoutmanager/ensurelayout(for:)-6ptsj.md)
- [ensureLayout(for:)](uikit/nstextlayoutmanager/ensurelayout(for:)-3duae.md)
- [enumerateTextLayoutFragments(from:options:using:)](uikit/nstextlayoutmanager/enumeratetextlayoutfragments(from:options:using:).md)
- [NSTextLayoutManager.SegmentType](uikit/nstextlayoutmanager/segmenttype.md)
