partial void LoginWithPhone_TouchUpInside(UIButton sender) { UIViewController loginWithPhoneViewController = accountKit.GetViewControllerForPhoneLogin(); PrepareLoginViewController(loginWithPhoneViewController.AsIViewControllerProtocol()); UIWindow w = UIApplication.SharedApplication.KeyWindow; w.RootViewController.PresentViewController(loginWithPhoneViewController, true, null); }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); if (accountKit.CurrentAccessToken != null) { PerformSegue("AuthenticatedSegue", null); } if (pendingLoginViewController != null) { PrepareLoginViewController(pendingLoginViewController.AsIViewControllerProtocol()); UIWindow w = UIApplication.SharedApplication.KeyWindow; w.RootViewController.PresentViewController(pendingLoginViewController, true, null); pendingLoginViewController = null; } }