---
title: "transitionController(forDocumentAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uidocumentbrowserviewcontroller/transitioncontroller(fordocumentat:)"
---

# transitionController(forDocumentAt:)

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

## Declaration

```swift
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 doc://com.apple.uikit/documentation/UIKit/UIDocumentBrowserViewControllerDelegate/documentBrowser(_:didRequestDocumentCreationWithHandler:)method’s completion block).

## Return Value

Return Value Returns a newly instantiated transition controller. Its loadingProgress and targetView properties are both set to nil.

## Discussion

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. 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.

## See Also

### Animating transitions

- [UIDocumentBrowserTransitionController](uikit/uidocumentbrowsertransitioncontroller.md)
