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.
Declaration
func setFrame(_ frameRect: NSRect, display flag: Bool)Parameters
- frameRect:
The frame rectangle for the window, including the title bar.
- flag:
Specifies whether the window redraws the views that need to be displayed. When True the window sends a Displayifneeded() message down its view hierarchy, thus redrawing all views.
Discussion
Note that the window server limits window position coordinates to ±16,000 and sizes to 10,000.