Protocol

WKUIDelegate

The WKUIDelegate class provides methods for presenting native user interface elements on behalf of a webpage.

Overview

Web view user interface delegates implement this protocol to control the opening of new windows, augment the behavior of default menu items displayed when the user clicks elements, and perform other user interface–related tasks. These methods can be invoked as a result of handling JavaScript or other plug-in content. The default web view implementation assumes one window per web view, so non-conventional user interfaces might implement a user interface delegate.

Topics

Closing a Web View

webViewDidClose:

Notifies your app that the DOM window closed successfully.

Displaying the Upload Panel

Responding to Force Touch Actions

webView:shouldPreviewElement:

Determines whether the given element should show a preview.

webView:previewingViewControllerForElement:defaultActions:

Called when the user performs a peek action.

webView:commitPreviewingViewController:

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

Relationships

Inherits From

See Also

Initialization

WKNavigationDelegate

The methods of the WKNavigationDelegate protocol help you implement custom behaviors that are triggered during a web view's process of accepting, loading, and completing a navigation request.

WKProcessPool

A WKProcessPool object represents a pool of Web Content processes.

WKWindowFeatures

A WKWindowFeatures object specifies optional attributes for the containing window when a new web view is requested.

WKWebView

A WKWebView object displays interactive web content, such as for an in-app browser. You can use the WKWebView class to embed web content in your app. To do so, create a WKWebView object, set it as the view, and send it a request to load web content.

WKWebViewConfiguration

A collection of properties used to initialize a web view.

WKPreferences

A WKPreferences object encapsulates the preference settings for a web view.