objective c - OSX - Disable External Site Linking for Webview -


I am working to see a local HTML page inside a webvive and if I'm going to any external website I want to disable the user, click any button inside the page i.e.

You set a policy delegate for your view View the document for the WebPolicyDelegate The specific method you want to apply is:

  - (zero) webview: (webview *) Set the webview PolicyForNavigation Actions : (NSDictionary *) Action Request Request: (Ns URL Request) * Request Frame: (WebFram *) Frame Decisionter: (ID & lt; WebPolicyDecisionListener & gt;) Listener  

Easy to work just [listener Ignore] Call for everything it any back / forward navigation, reload or form against the work. If you want more control, you can see the word action notice and by calling [ignore listener] or [listener usage] First type can check.


Comments