---
title: "setConfiguration(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstoolbar/setconfiguration(_:)"
---

# setConfiguration(_:)

Specifies the new configuration details for the toolbar.

## Declaration

```swift
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 doc://com.apple.appkit/documentation/AppKit/NSToolbar/configuration property to disk and recreate it before passing it in this parameter.

## Discussion

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 property.

## See Also

### Autosaving the configuration

- [autosavesConfiguration](appkit/nstoolbar/autosavesconfiguration.md)
- [configuration](appkit/nstoolbar/configuration.md)
