<!--
{
  "availability" : [
    "macOS: 10.0.0 - 15.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSToolbar/setConfiguration(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSToolbar(im)setConfigurationFromDictionary:"
  },
  "title" : "setConfiguration(_:)"
}
-->

# setConfiguration(_:)

Specifies the new configuration details for the toolbar.

```
func setConfiguration(_ configDict: [String : Any])
```

## Parameters

`configDict`

A dictionary with the toolbar configuration details. The toolbar ignores any keys it doesn’t recognize. Typically, you save the original configuration dictionary from the [`configuration`](/documentation/AppKit/NSToolbar/configuration) property to disk and recreate it before passing it in this parameter.

## Discussion

If you implement your own autosave mechanism, call this method to restore the configuration of your toolbar to a previously saved state. The dictionary you read from disk must match the format of the dictionary in the [`configuration`](/documentation/AppKit/NSToolbar/configuration) property.

---

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)