saveFrame(usingName:)
Saves the window’s frame rectangle in the user defaults system under a given name.
Declaration
func saveFrame(usingName name: NSWindow.FrameAutosaveName)Parameters
- name:
The name under which the frame is to be saved.
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.