Instance Method

setContentSize:

Sets the size of the window’s content view to a given size, which is expressed in the window’s base coordinate system.

Declaration

- (void)setContentSize:(NSSize)size;

Parameters

size

The new size of the window’s content view in the window’s base coordinate system.

Discussion

This size in turn alters the size of the NSWindow object itself. Note that the window server limits window sizes to 10,000; if necessary, be sure to limit aSize relative to the frame rectangle.

See Also

Sizing Content

contentAspectRatio

The window’s content aspect ratio.

contentMinSize

The minimum size of the window’s content view in the window’s base coordinate system.

contentMaxSize

The maximum size of the window’s content view in the window’s base coordinate system.

contentResizeIncrements

The window’s content-view resizing increments.

contentLayoutGuide

A value used by Auto Layout constraints to automatically bind to the value of contentLayoutRect.

contentLayoutRect

The area inside the window that is for non-obscured content, in window coordinates.

maxFullScreenContentSize

A maximum size that is used to determine if a window can fit when it is in full screen in a tile.

minFullScreenContentSize

A minimum size that is used to determine if a window can fit when it is in full screen in a tile.