---
title: nsSortDescriptors
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/fetchedresults/nssortdescriptors
---

# nsSortDescriptors

The request’s sort descriptors, accessed as reference types.

## Declaration

```swift
@MainActor @preconcurrency var nsSortDescriptors: [NSSortDescriptor] { get nonmutating set }
```

## Discussion

Discussion Set this value to cause the associated FetchRequest to execute a fetch with a new collection of NSSortDescriptor instances. The order of managed objects stored in the results collection may change as a result. If you want to use SortDescriptor instances, set sortDescriptors instead.

## See Also

### Configuring the associated fetch request

- [nsPredicate](swiftui/fetchedresults/nspredicate.md)
- [sortDescriptors](swiftui/fetchedresults/sortdescriptors.md)
