Contents

setAutorecalculatesContentBorderThickness(_:for:)

Specifies whether the window calculates the thickness of a given border automatically.

Declaration

func setAutorecalculatesContentBorderThickness(_ flag: Bool, for edge: NSRectEdge)

Parameters

  • flag:

    If True, the window calculates the thickness of the edge automatically; if False, it does not.

  • edge:

    The border to set auto-recalculation on or off:

    • NSMaxYEdge: Top border.

    • NSMinYEdge: Bottom border.

Discussion

Turning off a border’s auto-recalculation status sets its border thickness to 0.0.

In a nontextured window calling setAutorecalculatesContentBorderThickness:forEdge: passing NSMaxYEdge will raise an exception (in a nontextured window, it’s only valid to set the content border thickness of the bottom edge). It is only valid to set the content border thickness of the top edge in a textured window.

Typically, if you call setContentBorderThickness:forEdge:, you should also call setAutorecalculatesContentBorderThickness:NO forEdge:.

See Also

Configuring the Window’s Appearance