private void SesionViewController_OnLoginSuccess(object sender, EventArgs e) { // Muestro Tab View TabViewController tabViewController = GetViewController(MainStoryboard, "TabViewController") as TabViewController; Window.RootViewController = tabViewController; }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Conexion SQLite scon = new SQLite(); // Localizacion loc = new Location(); // Compruebo usuario if (string.IsNullOrWhiteSpace(UserDataDefaults.GetToken())) { // View login Sesion.Sesion_ViewController sesionViewController = GetViewController(MainStoryboard, "SesionViewController") as Sesion.Sesion_ViewController; sesionViewController.OnLoginSuccess += SesionViewController_OnLoginSuccess; Window.RootViewController = sesionViewController; } else { // Muestro Tab View TabViewController tabViewController = GetViewController(MainStoryboard, "TabViewController") as TabViewController; Window.RootViewController = tabViewController; } return(true); }