---
title: granularity
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/nstextselection/granularity-swift.property
---

# granularity

The granularity of the selection.

## Declaration

```swift
var granularity: NSTextSelection.Granularity { get }
```

## Discussion

Discussion The default is NSTextSelection.Granularity.character. Selection extending operations modify the selection by granularity.

## See Also

### Characteristics of a selection

- [affinity](uikit/nstextselection/affinity-swift.property.md)
- [NSTextSelection.Affinity](uikit/nstextselection/affinity-swift.enum.md)
- [anchorPositionOffset](uikit/nstextselection/anchorpositionoffset.md)
- [NSTextSelection.Granularity](uikit/nstextselection/granularity-swift.enum.md)
- [isLogical](uikit/nstextselection/islogical.md)
- [isTransient](uikit/nstextselection/istransient.md)
- [secondarySelectionLocation](uikit/nstextselection/secondaryselectionlocation.md)
- [NSTextLocation](uikit/nstextlocation.md)
- [textRanges](uikit/nstextselection/textranges.md)
- [typingAttributes](uikit/nstextselection/typingattributes.md)
