title: dismissViewController but keep reference
body: <p>Lets say I have an app which basically exist of a tabbarcontroller with views. One of the views has a button which presents a modal viewcontroller. The purpose of this viewcontroller is to enter some data like a name and when pressing on start it starts recording so it also keeps a reference to the time and displays the total amount of recording time.</p>
  
  <p>(After clicking the start button the button changes to a stop button)</p>
  
  <p>During recording the user can click the close button which will dismiss the viewcontroller (holding the variables like name and recording time) and the app returns to its tabbarcontroller with views. When the user presses the button (which presents the modal viewcontroller) again while recording it must show the viewcontroller with the data entered previously (name, total amount of recording time).</p>
  
  <p>So this data must be kept alive after the following code runs:</p>
  
  <pre><code>- (IBAction)close:(id)sender {
       [[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
  }
  </code></pre>
  
  <p>The code above will dismiss the viewcontroller but also destroys the variables in that viewcontroller. What would be the best way to keep the variables entered in that viewcontroller after dismissing it?</p>
  
  <p>Should the tabbarcontroller's view be responsible for this data? Or should I keep a reference to my modal viewcontroller and keep it alive in the background? And how would I do this in code?</p>
  
  <p>Finally when the user does stop the recording by clicking on the stop button in the modal view controller and presses the close button this view should be destroyed to preserve memory of course.</p>