<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPageControllerDelegate/pageController(_:identifierFor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSPageControllerDelegate(im)pageController:identifierForObject:"
  },
  "title" : "pageController(_:identifierFor:)"
}
-->

# pageController(_:identifierFor:)

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

```
@MainActor optional func pageController(_ pageController: NSPageController, identifierFor object: Any) -> NSPageController.ObjectIdentifier
```

## Parameters

`pageController`

The page controller.

`object`

The object to display.

## Return Value

Returns a string identifier for the view controller for the specified object.

## Discussion

If `pageController` does not have an unused view controller for this identifier, the you will be asked to create one via [`pageController(_:viewControllerForIdentifier:)`](/documentation/AppKit/NSPageControllerDelegate/pageController(_:viewControllerForIdentifier:)).

---

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)