---
title: "saveFrame(usingName:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/saveframe(usingname:)"
---

# saveFrame(usingName:)

Saves the window’s frame rectangle in the user defaults system under a given name.

## Declaration

```swift
func saveFrame(usingName name: NSWindow.FrameAutosaveName)
```

## Parameters

- `name`: The name under which the frame is to be saved.

## Discussion

Discussion With the companion method setFrameUsingName(_:), you can save and reset an NSWindow object’s frame over various launches of an application. The default is owned by the application and stored under the name “NSWindow Frame name”. See UserDefaults for more information.

## See Also

### Managing Window Frames in User Defaults

- [removeFrame(usingName:)](appkit/nswindow/removeframe(usingname:).md)
- [setFrameUsingName(_:)](appkit/nswindow/setframeusingname(_:).md)
- [setFrameUsingName(_:force:)](appkit/nswindow/setframeusingname(_:force:).md)
- [setFrameAutosaveName(_:)](appkit/nswindow/setframeautosavename(_:).md)
- [frameAutosaveName](appkit/nswindow/frameautosavename-swift.property.md)
- [NSWindow.FrameAutosaveName](appkit/nswindow/frameautosavename-swift.typealias.md)
- [frameDescriptor](appkit/nswindow/framedescriptor.md)
- [setFrame(from:)](appkit/nswindow/setframe(from:).md)
- [NSWindow.PersistableFrameDescriptor](appkit/nswindow/persistableframedescriptor.md)
