title: iOS: Dismissing and Presenting ModalViewController without access to its Parent ViewController
body: <p><strong>Background:</strong> I would like to dismiss a modalView that I have presented earlier and right away present the same <code>viewController</code> that I just dismissed with new information. </p>
  
  <p><strong>Problem:</strong> I have not been very successful in doing so without an explicit pointer to the parent <code>ViewController</code> that presented the first <code>ViewController</code> modally. I am trying to write this class that works without messing around with the previous <code>viewController</code>'s code. </p>
  
  <p><strong>Possible lead:</strong> There are couple of things I have been experimenting with:</p>
  
  <p>1.) Trying to get access to the parent <code>ViewController</code>, which at this time I don't know how to.</p>
  
  <p>2.) Once access to the parent is gained, I can simply apply the following code:</p>
  
  <pre><code>UIViewController* toPresentViewController = [[UIViewController alloc] init];
      [self dismissViewControllerAnimated:YES completion:^{
          [parentViewControllerAccessor presentModalViewController:toPresentViewController animated:YES];
  }];
  </code></pre>
  
  <p>In theory this should work given the access to parent <code>viewController</code>. I am open to other ways of doing this. </p>
  
  <p><strong>Assumption:</strong> You do not have permission to change any code in the parent <code>ViewController</code>.</p>