<!--
{
  "availability" : [
    "iOS: 10.0.0 - 13.0.0",
    "iPadOS: 10.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKUIDelegate/webView(_:commitPreviewingViewController:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKUIDelegate(im)webView:commitPreviewingViewController:"
  },
  "title" : "webView(_:commitPreviewingViewController:)"
}
-->

# webView(_:commitPreviewingViewController:)

Called when the user performs a pop action on the preview.

```
optional func webView(_ webView: WKWebView, commitPreviewingViewController previewingViewController: UIViewController)
```

## Parameters

`webView`

The web view invoking the delegate method.

`previewingViewController`

The view controller that is popped.

## Discussion

You must display the previewed view controller inside of your app.

---

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)