Instance Method

animationResizeTime:

Specifies the duration of a smooth frame-size change.

Declaration

- (NSTimeInterval)animationResizeTime:(NSRect)newFrame;

Parameters

newFrame

The frame rectangle specified in setFrame:display:animate:.

Return Value

The duration of the frame size change.

Discussion

Subclasses can override this method to control the total time for the frame change.

The NSWindow implementation uses the value from the NSWindowResizeTime user default as the time in seconds to resize by 150 pixels. If this value is unspecified, NSWindowResizeTime is 0.20 seconds (this default value may be different in different releases of macOS).

See Also

Sizing Windows

frame

The window’s frame rectangle in screen coordinates, including the title bar.

- setFrameOrigin:

Positions the bottom-left corner of the window’s frame rectangle at a given point in screen coordinates.

- setFrameTopLeftPoint:

Positions the top-left corner of the window’s frame rectangle at a given point in screen coordinates.

- constrainFrameRect:toScreen:

Modifies and returns a frame rectangle so that its top edge lies on a specific screen.

- cascadeTopLeftFromPoint:

Positions the window’s top-left to a given point.

- setFrame:display:

Sets the origin and size of the window’s frame rectangle according to a given frame rectangle, thereby setting its position and size onscreen.

- setFrame:display:animate:

Sets the origin and size of the window’s frame rectangle, with optional animation, according to a given frame rectangle, thereby setting its position and size onscreen.

aspectRatio

The window’s aspect ratio, which constrains the size of its frame rectangle to integral multiples of this ratio when the user resizes it.

minSize

The minimum size to which the window’s frame (including its title bar) can be sized.

maxSize

The maximum size to which the window’s frame (including its title bar) can be sized.

zoomed

A Boolean value that indicates whether the window is in a zoomed state.

- performZoom:

This action method simulates the user clicking the zoom box by momentarily highlighting the button and then zooming the window.

- zoom:

This action method toggles the size and location of the window between its standard state (provided by the application as the “best” size to display the window’s data) and its user state (a new size and location the user may have set by moving or resizing the window).

resizeFlags

The flags field of the event record for the mouse-down event that initiated the resizing session.

showsResizeIndicator

A Boolean value that indicates whether the window’s resize indicator is visible.

Deprecated
resizeIncrements

The window’s resizing increments.

preservesContentDuringLiveResize

A Boolean value that indicates whether the window tries to optimize user-initiated resize operations by preserving the content of views that have not changed.

inLiveResize

A Boolean value that indicates whether the window is being resized by the user.