Tells the delegate that the window is about to show a sheet at the specified location, giving it the opportunity to return a custom location for the attachment of the sheet to the window.
- macOS 10.3+
The window containing the sheet to be animated.
The sheet to be shown.
The default sheet location, just under the title bar of the window, aligned with the left and right edges of the window.
The custom location specified.
This method is also called whenever the user resizes
sheet is attached.
This method is useful in many situations. If your window has a toolbar, for example, you can specify a location for the sheet that is just below it. If you want the sheet associated with a certain control or view, you could position the sheet so that it appears to originate from the object (through animation) or is positioned next to it.
rect parameter nor the returned
NSRect value define the boundary of the sheet. They indicate where the top-left edge of the sheet is attached to the window. The origin is expressed in window coordinates; the default
origin value is the height of the content view and the default
origin value is 0. The
size value indicates the width and behavior of the initial animation; if
size is narrower than the sheet, the sheet genies out from the specified location, and if
size is wider than the sheet, the sheet slides out. You cannot affect the size of the sheet through the
size fields. It is recommended that you specify zero for the
size value as this field may have additional meaning in a future release.