title: Present a Different View Controller After Dismissing a Modal View Controller
body: <p>I present a modal view controller for various UI settings in an iOS app.  One of those settings allows the user to select a different main view.  When they hit "Done" I want to dismiss the modal view and have the newly-selected view controller appear, without a momentary delay where the old view controller segues to the new view controller.  How could this be implemented?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Here is a method I successfully implemented using Eugene's technique, but without the app delegate.  Instead, this implementation is specific to my scenario where a view controller in a navigation stack presents the modal view controller in a Utility app.</p>
  
  <pre><code>- (void)swapFrontSideViewController;
  {
      UINavigationController *navigationVC = (UINavigationController *)[self presentingViewController];
      NSMutableArray *viewControllers      = [NSMutableArray arrayWithArray:navigationVC.viewControllers];
      UIViewControllerSubclass *selectedViewController = nil;
      if ([self.selectedFrontSide isEqualToString:FRONT_SIDE_NAME1]) {
          selectedViewController = [self.storyboard instantiateViewControllerWithIdentifier:FRONT_SIDE_NAME1];
      } else if ([self.selectedFrontSide isEqualToString:FRONT_SIDE_NAME2]) {
          selectedViewController = [self.storyboard instantiateViewControllerWithIdentifier:FRONT_SIDE_NAME2];
      }
      if (selectedViewController) {
          [viewControllers replaceObjectAtIndex:viewControllers.count -1 withObject:selectedViewController];
          [navigationVC setViewControllers:viewControllers];
          self.delegate = selectedViewController;
      } else {
          NSLog(@"Error: Undefined Front Side Selected.");
      }
  }
  </code></pre>