Instance Method

saveFrameUsingName:

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

Declaration

- (void)saveFrameUsingName:(NSWindowFrameAutosaveName)name;

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 NSUserDefaults for more information.

See Also

Managing Window Frames in User Defaults

+ removeFrameUsingName:

Removes the frame data stored under a given name from the application’s user defaults.

- setFrameUsingName:

Sets the window’s frame rectangle by reading the rectangle data stored under a given name from the defaults system.

- setFrameUsingName:force:

Sets the window’s frame rectangle by reading the rectangle data stored under a given name from the defaults system. Can operate on non-resizable windows.

frameAutosaveName

The name used to automatically save the window’s frame rectangle data in the defaults system.

stringWithSavedFrame

A string representation of the window’s frame rectangle.

- setFrameFromString:

Sets the window’s frame rectangle from a given string representation.