Contents

setFrameUsingName(_:)

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

Declaration

func setFrameUsingName(_ name: NSWindow.FrameAutosaveName) -> Bool

Parameters

  • name:

    The name of the frame to read.

Return Value

true when name is read and the frame is set successfully; otherwise, false.

Discussion

The frame is constrained according to the window’s minimum and maximum size settings. This method causes a windowWillResize(_:to:) message to be sent to the delegate.

See Also

Managing Window Frames in User Defaults