---
title: "init(presentedViewController:presenting:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uipresentationcontroller/init(presentedviewcontroller:presenting:)"
---

# init(presentedViewController:presenting:)

Initializes and returns a presentation controller for transitioning between the specified view controllers.

## Declaration

```swift
init(presentedViewController: UIViewController, presenting presentingViewController: UIViewController?)
```

## Parameters

- `presentedViewController`: The view controller being presented modally.
- `presentingViewController`: The view controller whose content represents the starting point of the transition.

## Return Value

Return Value An initialized presentation controller object or nil if the presentation controller could not be initialized.

## Discussion

Discussion This method is the designated initializer for the presentation controller. You must call it from any custom initialization methods you define for your presentation controller subclasses.
