<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILargeContentViewerInteractionDelegate/viewController(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UILargeContentViewerInteractionDelegate(im)viewControllerForLargeContentViewerInteraction:"
  },
  "title" : "viewController(for:)"
}
-->

# viewController(for:)

Specifies which view controller should display the large content viewer.

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

## Parameters

`interaction`

The large content viewer that the system is displaying.

## Return Value

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

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

---

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)