Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

WKNavigationDelegate results in lost functionality for Navigating and Navigated

timi2shoestimi2shoes USMember ✭✭

I have a webview for iOS and am trying to use the functionality of DecidePolicy in WKNavigationDelegate and the Forms WebNavigatinEvent together.

When I override DecidePolicy, my Navigating and Navigated events are no longer hit.

Has anyone come up with a solution to use both together?

The biggest reason I am trying to use DecidePolicy is to know how a link is handled by looking at WKNavigationType.

Answers

  • Jack_HuaJack_Hua Member ✭✭✭

    You can use the methods in WKNavigationDelegate to handle events, for example:

        public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation)
    
        public override void DidCommitNavigation(IWKNavigationDelegate, WKWebView, WKNavigation)
    
Sign In or Register to comment.