pageController(_:prepare:with:)
Prepare the view controller and it’s view for drawing.
Declaration
@MainActor optional func pageController(_ pageController: NSPageController, prepare viewController: NSViewController, with object: Any?)Parameters
- pageController:
The page controller.
- viewController:
The view controller to prepare for drawing. You should setup the data sources and perform layout.
- object:
The object to display.
Discussion
If this method is not implemented, then viewController object’s representedObject is set to the object.
This method is only useful if pageController(_:identifierFor:) and pageController(_:prepare:with:) are implemented.