---
title: "viewController(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uilargecontentviewerinteractiondelegate/viewcontroller(for:)"
---

# viewController(for:)

Specifies which view controller should display the large content viewer.

## Declaration

```swift
optional func viewController(for interaction: UILargeContentViewerInteraction) -> UIViewController
```

## Parameters

- `interaction`: The large content viewer that the system is displaying.

## Return Value

Return Value A view controller that the system uses to present the large content viewer in.

## Discussion

Discussion By default, UIKit uses a view controller that contains the view you added the interaction to. If this default choice doesn’t work for your app, implement this method to specify a different view controller.

## See Also

### Customizing large content viewer interactions

- [largeContentViewerInteraction(_:didEndOn:at:)](uikit/uilargecontentviewerinteractiondelegate/largecontentviewerinteraction(_:didendon:at:).md)
- [largeContentViewerInteraction(_:itemAt:)](uikit/uilargecontentviewerinteractiondelegate/largecontentviewerinteraction(_:itemat:).md)
