public interface WKNavigationDelegate
| Modifier and Type | Interface and Description |
|---|---|
static interface |
WKNavigationDelegate.Block_webViewAuthenticationChallengeShouldAllowDeprecatedTLS |
static interface |
WKNavigationDelegate.Block_webViewDecidePolicyForNavigationActionDecisionHandler |
static interface |
WKNavigationDelegate.Block_webViewDecidePolicyForNavigationActionPreferencesDecisionHandler |
static interface |
WKNavigationDelegate.Block_webViewDecidePolicyForNavigationResponseDecisionHandler |
static interface |
WKNavigationDelegate.Block_webViewDidReceiveAuthenticationChallengeCompletionHandler |
| Modifier and Type | Method and Description |
|---|---|
default void |
webViewAuthenticationChallengeShouldAllowDeprecatedTLS(WKWebView webView,
NSURLAuthenticationChallenge challenge,
WKNavigationDelegate.Block_webViewAuthenticationChallengeShouldAllowDeprecatedTLS decisionHandler)
Invoked when the web view is establishing a network connection using a deprecated version of TLS.
|
default void |
webViewDecidePolicyForNavigationActionDecisionHandler(WKWebView webView,
WKNavigationAction navigationAction,
WKNavigationDelegate.Block_webViewDecidePolicyForNavigationActionDecisionHandler decisionHandler)
Decides whether to allow or cancel a navigation.
|
default void |
webViewDecidePolicyForNavigationActionPreferencesDecisionHandler(WKWebView webView,
WKNavigationAction navigationAction,
WKWebpagePreferences preferences,
WKNavigationDelegate.Block_webViewDecidePolicyForNavigationActionPreferencesDecisionHandler decisionHandler)
Decides whether to allow or cancel a navigation.
|
default void |
webViewDecidePolicyForNavigationResponseDecisionHandler(WKWebView webView,
WKNavigationResponse navigationResponse,
WKNavigationDelegate.Block_webViewDecidePolicyForNavigationResponseDecisionHandler decisionHandler)
Decides whether to allow or cancel a navigation after its
response is known.
|
default void |
webViewDidCommitNavigation(WKWebView webView,
WKNavigation navigation)
Invoked when content starts arriving for the main frame.
|
default void |
webViewDidFailNavigationWithError(WKWebView webView,
WKNavigation navigation,
NSError error)
Invoked when an error occurs during a committed main frame
navigation.
|
default void |
webViewDidFailProvisionalNavigationWithError(WKWebView webView,
WKNavigation navigation,
NSError error)
Invoked when an error occurs while starting to load data for
the main frame.
|
default void |
webViewDidFinishNavigation(WKWebView webView,
WKNavigation navigation)
Invoked when a main frame navigation completes.
|
default void |
webViewDidReceiveAuthenticationChallengeCompletionHandler(WKWebView webView,
NSURLAuthenticationChallenge challenge,
WKNavigationDelegate.Block_webViewDidReceiveAuthenticationChallengeCompletionHandler completionHandler)
Invoked when the web view needs to respond to an authentication challenge.
|
default void |
webViewDidReceiveServerRedirectForProvisionalNavigation(WKWebView webView,
WKNavigation navigation)
Invoked when a server redirect is received for the main
frame.
|
default void |
webViewDidStartProvisionalNavigation(WKWebView webView,
WKNavigation navigation)
Invoked when a main frame navigation starts.
|
default void |
webViewNavigationActionDidBecomeDownload(WKWebView webView,
WKNavigationAction navigationAction,
WKDownload download)
Called after using WKNavigationActionPolicyDownload.
|
default void |
webViewNavigationResponseDidBecomeDownload(WKWebView webView,
WKNavigationResponse navigationResponse,
WKDownload download)
Called after using WKNavigationResponsePolicyDownload.
|
default void |
webViewWebContentProcessDidTerminate(WKWebView webView)
Invoked when the web view's web content process is terminated.
|
default void webViewDecidePolicyForNavigationActionDecisionHandler(WKWebView webView, WKNavigationAction navigationAction, WKNavigationDelegate.Block_webViewDecidePolicyForNavigationActionDecisionHandler decisionHandler)
If you do not implement this method, the web view will load the request or, if appropriate, forward it to another application.
webView - The web view invoking the delegate method.navigationAction - Descriptive information about the action
triggering the navigation request.decisionHandler - The decision handler to call to allow or cancel the
navigation. The argument is one of the constants of the enumerated type WKNavigationActionPolicy.default void webViewDecidePolicyForNavigationResponseDecisionHandler(WKWebView webView, WKNavigationResponse navigationResponse, WKNavigationDelegate.Block_webViewDecidePolicyForNavigationResponseDecisionHandler decisionHandler)
If you do not implement this method, the web view will allow the response, if the web view can show it.
webView - The web view invoking the delegate method.navigationResponse - Descriptive information about the navigation
response.decisionHandler - The decision handler to call to allow or cancel the
navigation. The argument is one of the constants of the enumerated type WKNavigationResponsePolicy.default void webViewDidCommitNavigation(WKWebView webView, WKNavigation navigation)
webView - The web view invoking the delegate method.navigation - The navigation.default void webViewDidFailNavigationWithError(WKWebView webView, WKNavigation navigation, NSError error)
webView - The web view invoking the delegate method.navigation - The navigation.error - The error that occurred.default void webViewDidFailProvisionalNavigationWithError(WKWebView webView, WKNavigation navigation, NSError error)
webView - The web view invoking the delegate method.navigation - The navigation.error - The error that occurred.default void webViewDidFinishNavigation(WKWebView webView, WKNavigation navigation)
webView - The web view invoking the delegate method.navigation - The navigation.default void webViewDidReceiveAuthenticationChallengeCompletionHandler(WKWebView webView, NSURLAuthenticationChallenge challenge, WKNavigationDelegate.Block_webViewDidReceiveAuthenticationChallengeCompletionHandler completionHandler)
If you do not implement this method, the web view will respond to the authentication challenge with the NSURLSessionAuthChallengeRejectProtectionSpace disposition.
webView - The web view that received the authentication challenge.challenge - The authentication challenge.completionHandler - The completion handler you must invoke to respond to the challenge. The
disposition argument is one of the constants of the enumerated type
NSURLSessionAuthChallengeDisposition. When disposition is NSURLSessionAuthChallengeUseCredential,
the credential argument is the credential to use, or nil to indicate continuing without a
credential.default void webViewDidReceiveServerRedirectForProvisionalNavigation(WKWebView webView, WKNavigation navigation)
webView - The web view invoking the delegate method.navigation - The navigation.default void webViewDidStartProvisionalNavigation(WKWebView webView, WKNavigation navigation)
webView - The web view invoking the delegate method.navigation - The navigation.default void webViewWebContentProcessDidTerminate(WKWebView webView)
webView - The web view whose underlying web content process was terminated.default void webViewDecidePolicyForNavigationActionPreferencesDecisionHandler(WKWebView webView, WKNavigationAction navigationAction, WKWebpagePreferences preferences, WKNavigationDelegate.Block_webViewDecidePolicyForNavigationActionPreferencesDecisionHandler decisionHandler)
If you implement this method, -webView:decidePolicyForNavigationAction:decisionHandler: will not be called.
webView - The web view invoking the delegate method.navigationAction - Descriptive information about the action
triggering the navigation request.preferences - The default set of webpage preferences. This may be
changed by setting defaultWebpagePreferences on WKWebViewConfiguration.decisionHandler - The policy decision handler to call to allow or cancel
the navigation. The arguments are one of the constants of the enumerated type
WKNavigationActionPolicy, as well as an instance of WKWebpagePreferences.default void webViewAuthenticationChallengeShouldAllowDeprecatedTLS(WKWebView webView, NSURLAuthenticationChallenge challenge, WKNavigationDelegate.Block_webViewAuthenticationChallengeShouldAllowDeprecatedTLS decisionHandler)
webView - The web view initiating the connection.challenge - The authentication challenge.decisionHandler - The decision handler you must invoke to respond to indicate whether or not to continue with the connection establishment.default void webViewNavigationActionDidBecomeDownload(WKWebView webView, WKNavigationAction navigationAction, WKDownload download)
The download needs its delegate to be set to receive updates about its progress.
webView - The web view that created the download.navigationAction - The action that is being turned into a download.download - The download.default void webViewNavigationResponseDidBecomeDownload(WKWebView webView, WKNavigationResponse navigationResponse, WKDownload download)
The download needs its delegate to be set to receive updates about its progress.
webView - The web view that created the download.navigationResponse - The response that is being turned into a download.download - The download.