---
title: "revertToInitialValues(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsuserdefaultscontroller/reverttoinitialvalues(_:)"
---

# revertToInitialValues(_:)

Causes the receiver to discard all edits and replace the values of all the user default properties with any corresponding values in the initialValues dictionary.

## Declaration

```swift
@IBAction func revertToInitialValues(_ sender: Any?)
```

## Discussion

Discussion This effectively sets the preferences that a user can change to their “out-of-the-box” values. This method has no effect if initial values were not specified. The sender is typically the object that invoked this method.

## See Also

### Managing user defaults values

- [defaults](appkit/nsuserdefaultscontroller/defaults.md)
- [initialValues](appkit/nsuserdefaultscontroller/initialvalues.md)
- [hasUnappliedChanges](appkit/nsuserdefaultscontroller/hasunappliedchanges.md)
- [appliesImmediately](appkit/nsuserdefaultscontroller/appliesimmediately.md)
- [values](appkit/nsuserdefaultscontroller/values.md)
- [revert(_:)](appkit/nsuserdefaultscontroller/revert(_:).md)
- [save(_:)](appkit/nsuserdefaultscontroller/save(_:).md)
