I modally called my terms and conditions screen from my root controller as follows:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *uiViewController = [storyboard instantiateViewControllerWithIdentifier:@"splashViewController"];
[uiViewController setModalPresentationStyle:UIModalPresentationCustom];
[uiViewController setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
[self presentViewController:uiViewController animated:YES completion:nil];
The following is how the modal view returns to the root view.
[self.navigationController popViewControllerAnimated:NO];
[self dismissViewControllerAnimated:YES completion:nil];
The modal view can create other modal views but when the user returns from the that view, he/she returns to the root view and the terms and conditions view and the views created from it should disappear from history.
How can I return to the main (root) view from views created from the terms and conditions view so that the app forgets about all views modally created.