private bool WebViewShouldStartLoad(UIWebView aWebView, MonoTouch.Foundation.NSUrlRequest aRequest, UIWebViewNavigationType aNavigationType)
 {
     // check for link clicked, open modal view controller if true
     if (aNavigationType == UIWebViewNavigationType.LinkClicked)
     {
         PresentModalViewUrl(aRequest.Url.AbsoluteString);
         return(false);
     }
     else
     {
         return(true);
     }
 }
            public override bool ShouldStartLoad(UIWebView webView, MonoTouch.Foundation.NSUrlRequest request, UIWebViewNavigationType navigationType)
            {
                string urlStr = request.Url.AbsoluteString;
                Uri    uri    = new Uri(urlStr);
                string query  = uri.Query;

                if (query.IndexOf("status=complete") > -1)
                {
                    this.controller.finished = true;
                    this.controller.authHanlder.OnSuccess(uri);
                }
                return(true);
            }
Beispiel #3
0
        public override bool ShouldStartLoad(UIWebView webView, MonoTouch.Foundation.NSUrlRequest request, UIWebViewNavigationType navigationType)
        {
            string actionUri = string.Empty;
            string uri       = request.Url.AbsoluteUrl.ToString();

            if (uri.ToLower().Contains("hybrid://"))
            {
                actionUri = uri.Substring(9);
                CallNativeMethod(actionUri);
                return(false);
            }
            return(true);
        }
Beispiel #4
0
 protected virtual bool ShouldStartLoad(MonoTouch.Foundation.NSUrlRequest request, UIWebViewNavigationType navigationType)
 {
     return(true);
 }
Beispiel #5
0
 private bool WebViewMainShouldStartLoad(UIWebView aWebView, MonoTouch.Foundation.NSUrlRequest aRequest, UIWebViewNavigationType aNavigationType)
 {
     textFieldUrl.Text = aRequest.Url.AbsoluteString;             // if http is added programatically, this is the only way to reflect this if adderess is bad
     return(true);
 }