Class: UIPageViewController
- Inherits:
-
UIViewController
- Object
- NSObject
- UIResponder
- UIViewController
- UIPageViewController
Overview
Page view controllers allow users to navigate between view controllers using the specified transition. Navigation can be controlled by the user using gestures as well as programatically.
Instance Attribute Summary (collapse)
-
- dataSource
The object that provides view controllers.
-
- delegate
The delegate object.
-
- doubleSided
A Boolean value that indicates whether content appears on the back of pages.
-
- gestureRecognizers
readonly
An array of UIGestureRecognizer objects that are configured to handle user interaction.
-
- navigationOrientation
readonly
The direction along which navigation occurs.
-
- spineLocation
readonly
The location of the spine.
-
- transitionStyle
readonly
The style used to transition between view controllers.
-
- viewControllers
readonly
The view controllers displayed by the page view controller.
Attributes inherited from UIViewController
#childViewControllers, #contentSizeForViewInPopover, #definesPresentationContext, #editing, #hidesBottomBarWhenPushed, #interfaceOrientation, #modalInPopover, #modalPresentationStyle, #modalTransitionStyle, #navigationController, #navigationItem, #nibBundle, #nibName, #parentViewController, #presentedViewController, #presentingViewController, #providesPresentationContextTransitionStyle, #restorationClass, #restorationIdentifier, #searchDisplayController, #splitViewController, #storyboard, #tabBarController, #tabBarItem, #title, #toolbarItems, #view, #wantsFullScreenLayout
Attributes inherited from UIResponder
#inputAccessoryView, #inputView, #undoManager
Instance Method Summary (collapse)
-
- initWithTransitionStyle:navigationOrientation:options:
Initializes a newly created page view controller.
-
- setViewControllers:direction:animated:completion:
Sets the view controllers to be displayed.
Methods inherited from UIViewController
#addChildViewController:, attemptRotationToDeviceOrientation, #beginAppearanceTransition:animated:, #canPerformUnwindSegueAction:fromViewController:withSender:, #decodeRestorableStateWithCoder:, #didMoveToParentViewController:, #didReceiveMemoryWarning, #didRotateFromInterfaceOrientation:, #disablesAutomaticKeyboardDismissal, #dismissViewControllerAnimated:completion:, #editButtonItem, #encodeRestorableStateWithCoder:, #endAppearanceTransition, #initWithNibName:bundle:, #isBeingDismissed, #isBeingPresented, #isMovingFromParentViewController, #isMovingToParentViewController, #isViewLoaded, #loadView, #performSegueWithIdentifier:sender:, #preferredInterfaceOrientationForPresentation, #prepareForSegue:sender:, #presentViewController:animated:completion:, #removeFromParentViewController, #rotatingFooterView, #rotatingHeaderView, #segueForUnwindingToViewController:fromViewController:identifier:, #setEditing:animated:, #setToolbarItems:animated:, #shouldAutomaticallyForwardAppearanceMethods, #shouldAutomaticallyForwardRotationMethods, #shouldAutorotate, #shouldPerformSegueWithIdentifier:sender:, #supportedInterfaceOrientations, #transitionFromViewController:toViewController:duration:options:animations:completion:, #updateViewConstraints, #viewControllerForUnwindSegueAction:fromViewController:withSender:, #viewDidAppear:, #viewDidDisappear:, #viewDidLayoutSubviews, #viewDidLoad, #viewWillAppear:, #viewWillDisappear:, #viewWillLayoutSubviews, #willAnimateRotationToInterfaceOrientation:duration:, #willMoveToParentViewController:, #willRotateToInterfaceOrientation:duration:
Methods inherited from UIResponder
#becomeFirstResponder, #canBecomeFirstResponder, #canPerformAction:withSender:, #canResignFirstResponder, #isFirstResponder, #motionBegan:withEvent:, #motionCancelled:withEvent:, #motionEnded:withEvent:, #nextResponder, #reloadInputViews, #remoteControlReceivedWithEvent:, #resignFirstResponder, #touchesBegan:withEvent:, #touchesCancelled:withEvent:, #touchesEnded:withEvent:, #touchesMoved:withEvent:
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Instance Attribute Details
- (Object) dataSource
The object that provides view controllers. Methods of the data source are called in response to gesture-based navigation. If the value of this property is nil, then gesture-based navigation is disabled.
- (Object) delegate
The delegate object. Methods of the delegate are called in response to gesture-based navigation and orientation changes.
- (Boolean) doubleSided
A Boolean value that indicates whether content appears on the back of pages. The default value for this property is NO.If the back of pages has no content (the value is NO), then the content on the front of the page will partially show through to the back when turning pages.If the spine is located in the middle, the value must be YES. Setting it to NO with the spine located in the middle raises an exception.
- (Array) gestureRecognizers (readonly)
An array of UIGestureRecognizer objects that are configured to handle user interaction. (read-only) These gesture recognizers are initially attached to a view in the page view controller’s hierarchy. To change the region of the screen in which the user can navigate using gestures, they can be placed on another view.
- (UIPageViewControllerNavigationOrientation) navigationOrientation (readonly)
The direction along which navigation occurs. (read-only)
- (UIPageViewControllerSpineLocation) spineLocation (readonly)
The location of the spine. (read-only) The value of this property is set with the UIPageViewControllerOptionSpineLocationKey key when the page view controller is initialized, and can be changed by returning the new value from the pageViewController:spineLocationForInterfaceOrientation: method of the delegate.
- (UIPageViewControllerTransitionStyle) transitionStyle (readonly)
The style used to transition between view controllers. (read-only) The value of this property is set when the page view controller is initialized, and cannot be changed.
- (Array) viewControllers (readonly)
The view controllers displayed by the page view controller. (read-only)
Instance Method Details
- (Object) initWithTransitionStyle(style, navigationOrientation:navigationOrientation, options:options)
Initializes a newly created page view controller. After initialization, use the setViewControllers:direction:animated:completion: method to set the initial view controllers.
- (Object) setViewControllers(viewControllers, direction:direction, animated:animated, completion:completion)
Sets the view controllers to be displayed. The view controllers passed to this method are those that will be visible after the animation has completed. Use a data source to provide additional view controllers to which users navigate.If the transition style is UIPageViewControllerTransitionStylePageCurl, the view controllers to pass in the viewControllers parameter depends on the spine location and the value of the doubleSided property:Spine locationDouble sidedWhat to passUIPageViewControllerSpineLocationMidYESPass the page to be displayed on the left and the page to be displayed on the right.UIPageViewControllerSpineLocationMin or UIPageViewControllerSpineLocationMaxYESPass the front of the page to be displayed and the back of the previously-displayed page. The back is used for the page turning animation.UIPageViewControllerSpineLocationMin or UIPageViewControllerSpineLocationMaxNOPass the front of the page to be displayed.