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.Called after a gesture-driven transition completes.Returns the spine location for the given orientation.Called before a gesture-driven transition begins. (required)
Instance Method Summary (collapse)
Called after a gesture-driven transition completes.
Returns the spine location for the given orientation.
Called before a gesture-driven transition begins.
Instance Method Details
- () pageViewController(pageViewController, didFinishAnimating:finished, previousViewControllers:previousViewControllers, transitionCompleted:completed)
Called after a gesture-driven transition completes. 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.
- (UIPageViewControllerSpineLocation) pageViewController(pageViewController, spineLocationForInterfaceOrientation:orientation)
Returns the spine location for the given orientation. 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.
- () pageViewController(pageViewController, willTransitionToViewControllers:pendingViewControllers)
Called before a gesture-driven transition begins. (required) If the user aborts the navigation gesture, the transition doesn’t complete and the view controllers stay the same.