---
title: preservesSelection
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsarraycontroller/preservesselection
---

# preservesSelection

A Boolean value that indicates whether the receiver will attempt to preserve the current selection when the content changes

## Declaration

```swift
var preservesSelection: Bool { get set }
```

## Discussion

Discussion The default is true. This property is observable using key-value observing.

## See Also

### Selection Attributes

- [avoidsEmptySelection](appkit/nsarraycontroller/avoidsemptyselection.md)
- [alwaysUsesMultipleValuesMarker](appkit/nsarraycontroller/alwaysusesmultiplevaluesmarker.md)
