<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/saveFrame(usingName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)saveFrameUsingName:"
  },
  "title" : "saveFrame(usingName:)"
}
-->

# saveFrame(usingName:)

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

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

## Parameters

`name`

The name under which the frame is to be saved.

## Discussion

With the companion method [`setFrameUsingName(_:)`](/documentation/AppKit/NSWindow/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 <doc://com.apple.documentation/documentation/Foundation/UserDefaults> for more information.

---

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)