NSPageControllerDelegate Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Availability | Available in OS X v10.8 and later. |
| Declared in | NSPageController.h |
Overview
The NSPageControllerDelegate protocol allows you to customize the behavior of instances of the NSPageController class.
See NSPageController Class Reference for more information.
Tasks
Transition Notification
-
– pageControllerWillStartLiveTransition: -
– pageControllerDidEndLiveTransition: -
– pageController:didTransitionToObject:
Managing View Controllers
Instance Methods
pageController:didTransitionToObject:
This message is sent when any page transition is completed.
Parameters
- pageController
The page controller.
- object
The object to display.
Availability
- Available in OS X v10.8 and later.
Declared In
NSPageController.hpageController:frameForObject:
Returns the frame appropriate for displaying the specified object.
Parameters
- 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:identifierForObject: and pageController:viewControllerForIdentifier: are implemented.
Availability
- Available in OS X v10.8 and later.
See Also
Declared In
NSPageController.hpageController:identifierForObject:
Return the identifier of the view controller that owns a view to display the object.
Parameters
- pageController
The page controller.
- object
The object to display.
Return Value
Returns a string identifier for the view controller for the specified object.
Discussion
If pageController does not have an unused view controller for this identifier, the you will be asked to create one via pageController:viewControllerForIdentifier:.
Availability
- Available in OS X v10.8 and later.
See Also
Declared In
NSPageController.hpageController:prepareViewController:withObject:
Prepare the view controller and it’s view for drawing.
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:identifierForObject: and pageController:prepareViewController:withObject: are implemented.
Availability
- Available in OS X v10.8 and later.
See Also
Declared In
NSPageController.hpageController:viewControllerForIdentifier:
Returns a view controller the page controller uses for managing the specified identifier.
Parameters
- pageController
The page controller.
- identifier
The identifier for a view controller.
Return Value
Returns the view controller for the specified identifier.
Discussion
Your implementation of this method should return the requested view controller for the identifier or create and return a new view controller.
NSPageController will cache as many view controllers and views as necessary to maintain performance. This method is called whenever another instance is required.
The view controller may become the selectedViewController after a transition if necessary.
Availability
- Available in OS X v10.8 and later.
See Also
Declared In
NSPageController.hpageControllerDidEndLiveTransition:
This message is sent when a transition animation completes.
Parameters
- pageController
The page controller.
Discussion
This message is sent when a transition animation completes either via swipe gesture or one of the page controller’s target-action navigation methods.
Your content view is still hidden and you must call the completeTransition method on pageController when your content is ready to show.
If completed successfully, a pageController:didTransitionToObject: will already have been sent.
Availability
- Available in OS X v10.8 and later.
Declared In
NSPageController.hpageControllerWillStartLiveTransition:
This message is sent when the user begins a transition.
Parameters
- pageController
The page controller.
Discussion
This message is sent when the user begins a transition whether via a swipe gesture of one of the page controller’s target-action navigation methods.
Availability
- Available in OS X v10.8 and later.
Declared In
NSPageController.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-07-23)