<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPageViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPageViewController"
  },
  "title" : "UIPageViewController"
}
-->

# UIPageViewController

A container view controller that manages navigation between pages of content, where a subview controller manages each page.

```
@MainActor class UIPageViewController
```

## Overview

Page view controller–navigation can be controlled programmatically by your app or directly by the user using gestures. When navigating from page to page, the page view controller uses the transition that you specify to animate the change.

> Important:
> In tvOS, the ``doc://com.apple.uikit/documentation/UIKit/UIPageViewController`` class provides only a way to swipe between full-screen content pages. Unlike in iOS, a user cannot interact with or move focus between items on each page.

When defining a page view controller interface, you can provide the content view controllers one at a time (or two at a time, depending upon the spine position and double-sided state) or as-needed using a data source. When providing content view controllers one at a time, you use the [`setViewControllers(_:direction:animated:completion:)`](/documentation/UIKit/UIPageViewController/setViewControllers(_:direction:animated:completion:)) method to set the current content view controllers. To support gesture-based navigation, you must provide your view controllers using a data source object.

The data source for a page view controller is responsible for providing the content view controllers on demand and must conform to the [`UIPageViewControllerDataSource`](/documentation/UIKit/UIPageViewControllerDataSource) protocol. The delegate object—an object that conforms to the [`UIPageViewControllerDelegate`](/documentation/UIKit/UIPageViewControllerDelegate) protocol—provides some appearance-related information and receives notifications about gesture-initiated transitions.

This class is generally used as-is, but can also be subclassed.

## Topics

### Creating a page view controller

[`init(transitionStyle: UIPageViewController.TransitionStyle, navigationOrientation: UIPageViewController.NavigationOrientation, options: [UIPageViewController.OptionsKey : Any]?)`](/documentation/UIKit/UIPageViewController/init(transitionStyle:navigationOrientation:options:))

Initializes a newly created page view controller.

[`init?(coder: NSCoder)`](/documentation/UIKit/UIPageViewController/init(coder:))

Creates a page view controller from data in an unarchiver.

[`struct OptionsKey`](/documentation/UIKit/UIPageViewController/OptionsKey)

Keys for creating the page view controller.

### Providing the Page Content

[`var dataSource: (any UIPageViewControllerDataSource)?`](/documentation/UIKit/UIPageViewController/dataSource)

The object that provides view controllers.

[`protocol UIPageViewControllerDataSource`](/documentation/UIKit/UIPageViewControllerDataSource)

The [`UIPageViewControllerDataSource`](/documentation/UIKit/UIPageViewControllerDataSource) protocol is adopted by an object that provides view controllers to the page view controller on an as-needed basis, in response to navigation gestures.

### Customizing the Page View Behavior

[`var delegate: (any UIPageViewControllerDelegate)?`](/documentation/UIKit/UIPageViewController/delegate)

The delegate object.

[`protocol UIPageViewControllerDelegate`](/documentation/UIKit/UIPageViewControllerDelegate)

The delegate of a page view controller must adopt the [`UIPageViewControllerDelegate`](/documentation/UIKit/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.

### Providing Content

[`func setViewControllers([UIViewController]?, direction: UIPageViewController.NavigationDirection, animated: Bool, completion: ((Bool) -> Void)?)`](/documentation/UIKit/UIPageViewController/setViewControllers(_:direction:animated:completion:))

Sets the view controllers to be displayed.

[`enum NavigationDirection`](/documentation/UIKit/UIPageViewController/NavigationDirection)

Directions for page-turn transitions.

[`var viewControllers: [UIViewController]?`](/documentation/UIKit/UIPageViewController/viewControllers)

The view controllers displayed by the page view controller.

[`var gestureRecognizers: [UIGestureRecognizer]`](/documentation/UIKit/UIPageViewController/gestureRecognizers)

An array of [`UIGestureRecognizer`](/documentation/UIKit/UIGestureRecognizer) objects that are configured to handle user interaction.

### Display Options

[`var navigationOrientation: UIPageViewController.NavigationOrientation`](/documentation/UIKit/UIPageViewController/navigationOrientation-swift.property)

The direction along which navigation occurs.

[`enum NavigationOrientation`](/documentation/UIKit/UIPageViewController/NavigationOrientation-swift.enum)

Orientations for page-turn transitions.

[`var spineLocation: UIPageViewController.SpineLocation`](/documentation/UIKit/UIPageViewController/spineLocation-swift.property)

The location of the spine.

[`enum SpineLocation`](/documentation/UIKit/UIPageViewController/SpineLocation-swift.enum)

Locations for the spine.

[`var transitionStyle: UIPageViewController.TransitionStyle`](/documentation/UIKit/UIPageViewController/transitionStyle-swift.property)

The style used to transition between view controllers.

[`enum TransitionStyle`](/documentation/UIKit/UIPageViewController/TransitionStyle-swift.enum)

Styles for the page-turn transition.

[`var isDoubleSided: Bool`](/documentation/UIKit/UIPageViewController/isDoubleSided)

A Boolean value that indicates whether content appears on the back of pages.

## Relationships

### Conforms To

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`Sendable`](/documentation/Swift/Sendable)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`NSExtensionRequestHandling`](/documentation/Foundation/NSExtensionRequestHandling)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`UIStateRestoring`](/documentation/UIKit/UIStateRestoring)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`UIViewController`](/documentation/UIKit/UIViewController)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)