pageController(_:frameFor:)
Returns the frame appropriate for displaying the specified object.
Declaration
@MainActor optional func pageController(_ pageController: NSPageController, frameFor object: Any?) -> NSRectParameters
- pageController:
The page controller.
- object:
The object to display.
Return Value
The frame appropriate for displaying object.
Discussion
You only need to implement this if the view frame can differ between the page controller’s arrangedObjects.
This method must return immediately. Avoid file, network or any potentially blocking or lengthy work to provide an answer.
If this method is not implemented, all arrangedObjects are assumed to have the same frame as the pageController object’s current selectedViewController instance’s view or the bounds of view when selectedViewController is nil.
This method is only useful if pageController(_:identifierFor:) and pageController(_:viewControllerForIdentifier:) are implemented.