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

# transitionController(forDocumentURL:)

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

## Declaration

```swift
func transitionController(forDocumentURL 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.

## See Also

### Deprecated symbols

- [init(forOpeningFilesWithContentTypes:)](uikit/uidocumentbrowserviewcontroller/init(foropeningfileswithcontenttypes:).md)
- [recentDocumentsContentTypes](uikit/uidocumentbrowserviewcontroller/recentdocumentscontenttypes.md)
- [allowedContentTypes](uikit/uidocumentbrowserviewcontroller/allowedcontenttypes.md)
