while integrating a payment gateway in my iOS app, I used rootViewController
property as below:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UINavigationController *controller = [storyboard instantiateViewControllerWithIdentifier:@"navCtrlID"];
[[UIApplication sharedApplication].keyWindow setRootViewController:controller];
[self.navigationController presentViewController:controller animated:YES completion:nil];
It does the job, however now I have to press the back button multiple times to go back.
Why is it so?