Contents

webView(_:present:completionHandler:)

Declaration

func webView(_ webView: WKWebView, present environment: WKImmersiveEnvironment, completionHandler: @escaping ((any Error)?) -> Void)
func webView(_ webView: WKWebView, presentImmersiveEnvironment environment: WKImmersiveEnvironment) async throws

Parameters

  • webView:

    The web view requesting presentation.

  • environment:

    The immersive environment to present.

  • completionHandler:

    The completion handler you must invoke once the presentation transition has completed. The error argument should be used in case the presentation failed and the environment couldn’t be presented.

Discussion

Asks the delegate to present an immersive environment.