<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebExtension/Action/popupViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebExtensionAction(py)popupViewController"
  },
  "title" : "popupViewController"
}
-->

# popupViewController

A view controller that presents a web view loaded with the pop-up page for this action, or `nil` if no popup is specified.

```
var popupViewController: UIViewController? { get }
```

## Discussion

The view controller adaptively adjusts its presentation style based on where it is presented from, preferring popover.

It contains a web view preloaded with the pop-up page and automatically adjusts its `preferredContentSize` to fit the web view’s content size. The [`presentsPopup`](/documentation/WebKit/WKWebExtension/Action/presentsPopup) property should be checked to determine the availability of a pop-up before using this property.

Dismissing the view controller will close the pop-up and unload the web view.

## See Also

[`var presentsPopup: Bool`](/documentation/WebKit/WKWebExtension/Action/presentsPopup)

A Boolean value indicating whether the action has a pop-up.



---

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)