UIPageViewControllerDelegate Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iOS 5.0 and later. |
| Companion guide | |
| Declared in | UIPageViewController.h |
Overview
The delegate of a page view controller must adopt the UIPageViewControllerDelegate protocol. These methods allow the delegate to receive a notification when the device orientation changes and when the user navigates to a new page. For page-curl style transitions, the delegate can provide a different spine location in response to a change in the interface orientation.
Instance Methods
pageViewController:didFinishAnimating:previousViewControllers:transitionCompleted:
Called after a gesture-driven transition completes.
Parameters
- pageViewController
The page view controller.
- finished
YESif the animation finished; otherwise,NO.- previousViewControllers
The view controllers prior to the transition.
- completed
YESif the user completed the page-turn gesture; otherwise,NO.
Discussion
Use the completed parameter to distinguish between a transition that completed (the page was turned) and a transition that the user aborted (the page was not turned).
The value of the previousViewControllers parameter is the same as what the viewControllers method would have returned prior to the page turn.
Availability
- Available in iOS 5.0 and later.
Declared In
UIPageViewController.hpageViewController:spineLocationForInterfaceOrientation:
Returns the spine location for the given orientation.
Parameters
- pageViewController
The page view controller
- orientation
The new orientation.
Return Value
The spine location.
Discussion
Use this method to change the spine location when the device orientation changes, as well as setting new view controllers and changing the double-sided state.
This method is called only if the transition style is UIPageViewControllerTransitionStylePageCurl.
Availability
- Available in iOS 5.0 and later.
Declared In
UIPageViewController.hpageViewController:willTransitionToViewControllers:
Called before a gesture-driven transition begins. (required)
Parameters
- pageViewController
The page view controller.
- pendingViewControllers
The view controllers that are being transitioned to.
Discussion
If the user aborts the navigation gesture, the transition doesn’t complete and the view controllers stay the same.
Availability
- Available in iOS 6.0 and later.
Declared In
UIPageViewController.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)