AppDelegate WillEnterForeground should call loginViewController

ChristophKahlChristophKahl DEMember ✭✭

I got an application, the user should login by username and password.
The login process should start everytime the view is called. If the user is already logged in but the screen times out for example he also have to login again. In my opinion I have to use the WillEnterForeground funktion.
I have tried something like:

this.Window.RootViewController.NavigationController.PopToRootViewController(true);

or

var loginViewController = Window.RootViewController.Storyboard.InstantiateViewController("your_login_view_‌​controller_id");
Window.RootViewController = loginViewController; 
Sign In or Register to comment.