<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPageControllerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSPageControllerDelegate"
  },
  "title" : "NSPageControllerDelegate"
}
-->

# NSPageControllerDelegate

The `NSPageControllerDelegate` protocol allows you to customize the behavior of instances of the NSPageController class.

```
protocol NSPageControllerDelegate : NSObjectProtocol
```

## Overview

See [`NSPageController`](/documentation/AppKit/NSPageController) for more information.

> Note:
> If your page controller is going to completely manage the page snapshots, then you should not implement the ``doc://com.apple.appkit/documentation/AppKit/NSPageControllerDelegate/pageController(_:viewControllerForIdentifier:)`` or ``doc://com.apple.appkit/documentation/AppKit/NSPageControllerDelegate/pageController(_:prepare:with:)`` methods.
> 
> However, if you manually set the `NSPageController` instance’s ``doc://com.apple.appkit/documentation/AppKit/NSPageController/arrangedObjects`` property, you are required to implement the following those methods so that navigation can properly occur.

## Topics

### Transition Notification

[`pageControllerWillStartLiveTransition(_:)`](/documentation/AppKit/NSPageControllerDelegate/pageControllerWillStartLiveTransition(_:))

This message is sent when the user begins a transition.

[`pageControllerDidEndLiveTransition(_:)`](/documentation/AppKit/NSPageControllerDelegate/pageControllerDidEndLiveTransition(_:))

This message is sent when a transition animation completes.

[`pageController(_:didTransitionTo:)`](/documentation/AppKit/NSPageControllerDelegate/pageController(_:didTransitionTo:))

This message is sent when any page transition is completed.

### Managing View Controllers

[`pageController(_:identifierFor:)`](/documentation/AppKit/NSPageControllerDelegate/pageController(_:identifierFor:))

Return the identifier of the view controller that owns a view to display the object.

[`pageController(_:viewControllerForIdentifier:)`](/documentation/AppKit/NSPageControllerDelegate/pageController(_:viewControllerForIdentifier:))

Returns a view controller the page controller uses for managing the specified identifier.

[`pageController(_:prepare:with:)`](/documentation/AppKit/NSPageControllerDelegate/pageController(_:prepare:with:))

Prepare the view controller and it’s view for drawing.

[`pageController(_:frameFor:)`](/documentation/AppKit/NSPageControllerDelegate/pageController(_:frameFor:))

Returns the frame appropriate for displaying the specified object.

[`NSPageController.ObjectIdentifier`](/documentation/AppKit/NSPageController/ObjectIdentifier)



---

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)