I have an app that wants to log out user whenever application is inactive for a set period of time. It's multiple different views in the app, and i want the app delegate to set loginview as current view whenever this method fires:
- (void)applicationDidBecomeActive:(UIApplication *)application
How to manually set loginViewController as current showing view in the storyboard in this method?
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard"
bundle: nil];
LoginViewController *loginViewController = [mainStoryboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
[_window setRootViewController:loginViewController];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With