<!--
{
  "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/UIPageViewControllerDelegate/pageViewController(_:didFinishAnimating:previousViewControllers:transitionCompleted:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIPageViewControllerDelegate(im)pageViewController:didFinishAnimating:previousViewControllers:transitionCompleted:"
  },
  "title" : "pageViewController(_:didFinishAnimating:previousViewControllers:transitionCompleted:)"
}
-->

# pageViewController(_:didFinishAnimating:previousViewControllers:transitionCompleted:)

Called after a gesture-driven transition completes.

```
optional func pageViewController(_ pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool)
```

## Parameters

`pageViewController`

The page view controller.

`finished`

<doc://com.apple.documentation/documentation/Swift/true> if the animation finished; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

`previousViewControllers`

The view controllers prior to the transition.

`completed`

<doc://com.apple.documentation/documentation/Swift/true> if the user completed the page-turn gesture; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## 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`](/documentation/UIKit/UIPageViewController/viewControllers) method would have returned prior to the page turn.

---

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)