Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SWRevealViewController - manually switch to another view?

Tags:

I have a sidebar menu, made with SWRevealViewController.

One of menu elements in sidebar is "sign-in". It opens sign-in view (via custom SWRevealViewController segue).

I want to programmatically switch to another view after user successfully signs in. How do I do that?

UPDATE, my code:

ViewController *vc = [[ViewController alloc] init]; // this is main front ViewController SWRevealViewController *revealController = self.revealViewController; [revealController setFrontViewController:vc animated:YES]; 

After this I get just empty screen. What am I doing wrong? I feel that this is wrong:

ViewController *vc = [[ViewController alloc] init]; 

so what is correct way to access already loaded view controller? (it loads at app start by SWRevealViewController as front controller)