setContentBorderThickness(_:for:)
Specifies the thickness of a given border of the window.
Declaration
func setContentBorderThickness(_ thickness: CGFloat, for edge: NSRectEdge)Parameters
- thickness:
The thickness for
edge, in points. - edge:
The border whose thickness to set:
NSMaxYEdge: Top border.NSMinYEdge: Bottom border.
Discussion
In a nontextured window calling setContentBorderThickness: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:.
The contentBorder does not include the title bar or toolbar, so a textured window that just wants the gradient in the title bar and toolbar should have a thickness of 0 for NSMaxYEdge.