<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTreeController/sortDescriptors",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTreeController(py)sortDescriptors"
  },
  "title" : "sortDescriptors"
}
-->

# sortDescriptors

An array containing the sort descriptors used to arrange the tree controller’s content.

```
var sortDescriptors: [NSSortDescriptor] { get set }
```

## Discussion

When the value of this property is an empty array, the tree controller has no sort descriptors configured, which means that the contents are arranged in their natural order. This property is observable using key-value observing.

## See Also

[Cocoa Bindings](/documentation/AppKit/cocoa-bindings)

Automatically synchronize your data model with your app’s interface using Cocoa Bindings.



---

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)