void HandleBrowsingCompleted(object sender, EventArgs e) { if (!webViewVisible) { return; } if (authenticatingView == null) { authenticatingView = new UIView(View.Bounds) { AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight, BackgroundColor = UIColor.FromRGB(0x33, 0x33, 0x33), }; progress = new ProgressLabel("Authenticating..."); var f = progress.Frame; var b = authenticatingView.Bounds; f.X = (b.Width - f.Width) / 2; f.Y = (b.Height - f.Height) / 2; progress.Frame = f; authenticatingView.Add(progress); } else { authenticatingView.Frame = View.Bounds; } webViewVisible = false; progress.StartAnimating(); UIView.Transition( fromView: webView, toView: authenticatingView, duration: TransitionTime, options: UIViewAnimationOptions.TransitionCrossDissolve, completion: null); }
void HandleBrowsingCompleted (object sender, EventArgs e) { if (!webViewVisible) return; if (authenticatingView == null) { authenticatingView = new UIView (View.Bounds) { AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight, BackgroundColor = UIColor.FromRGB (0x33, 0x33, 0x33), }; progress = new ProgressLabel ("Authenticating..."); var f = progress.Frame; var b = authenticatingView.Bounds; f.X = (b.Width - f.Width) / 2; f.Y = (b.Height - f.Height) / 2; progress.Frame = f; authenticatingView.Add (progress); } else { authenticatingView.Frame = View.Bounds; } webViewVisible = false; progress.StartAnimating (); UIView.Transition ( fromView: webView, toView: authenticatingView, duration: TransitionTime, options: UIViewAnimationOptions.TransitionCrossDissolve, completion: null); }