I am trying to present a view controller (a passcode request type view) every time my app becomes active. Once the correct passcode is entered, it should pop off the stack.
Solved
PasscodeViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"passcodeVCID"];
UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:vc];
navController.navigationBar.hidden = YES;
vc.mode = @"enable";
self.window.rootViewController = navController;
Using in applicationWillEnterForeground method.