<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentBrowserViewController/transitionController(forDocumentAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocumentBrowserViewController(im)transitionControllerForDocumentAtURL:"
  },
  "title" : "transitionController(forDocumentAt:)"
}
-->

# transitionController(forDocumentAt:)

Creates a transition controller that provides the standard system-loading and segue animations for the document browser.

```
func transitionController(forDocumentAt documentURL: URL) -> UIDocumentBrowserTransitionController
```

## Parameters

`documentURL`

The URL of a document. Only use URLs provided by the document browser (for example, URLs passed to the delegate’s [`documentBrowser(_:didRequestDocumentCreationWithHandler:)`](/documentation/UIKit/UIDocumentBrowserViewControllerDelegate/documentBrowser(_:didRequestDocumentCreationWithHandler:))method’s completion block).

## Return Value

Returns a newly instantiated transition controller. Its [`loadingProgress`](/documentation/UIKit/UIDocumentBrowserTransitionController/loadingProgress) and [`targetView`](/documentation/UIKit/UIDocumentBrowserTransitionController/targetView) properties are both set to `nil`.

## Discussion

For the animations to function properly, you must maintain a strong reference to the transition controller until all the animation sequences are complete.

For more about using the transition controller, see [`UIDocumentBrowserTransitionController`](/documentation/UIKit/UIDocumentBrowserTransitionController).

> Note:
> In Mac apps built with Mac Catalyst, the transition controller doesn’t generate animations. macOS doesn’t use animations when opening or closing documents.

---

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)