WKWebView - Restricting domain

I'm trying to include an online form in my application using a webview, and I notice that the once the user finishes the form, s/he can navigate to different addresses. Is there any way I can restrict the domain/url access of a webkit? (This used to be possible using UIWebView example: http://stackoverflow.com/questions/7673116/restrict-uiwebview-to-certain-pages but it's now depricated)

Replies

You should check out WKWebView’s navigation delegate (WKNavigationDelegate), set via the

navigationDelegate
property on the web view itself. It has methods that lets you limit navigation, very similar to the UIWebView one you referenced.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"