I have such flow
navigationController-viewContorller
and at viewController I have switch that can present 3 other viewControllers modally. They will be presented separately and at the moment the only one of them can be on the screen. (Every viewController has the same switch that can present other viewController).
modal-viewContorller1
modal-viewContorller2
modal-viewContorller3
How can I do that? I have a common class for the switch that will present other viewControllers. But as they are presented modally, I can not go through already presented viewControllers to dismiss some of them. (I need only one of three modal viewControllers on the screen at the moment).
Also I present every modal viewController with navigationController:
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:self.userInterface];
[navigationController setNavigationBarHidden:YES];
How can I achieve that flow?