---
title: popupViewController
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/wkwebextension/action/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.

## Declaration

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

## Discussion

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

### Related Documentation

- [presentsPopup](webkit/wkwebextension/action/presentspopup.md)
