Cascade modal views
<p>What I'm trying to do:</p>

<ol>
<li>Display a modal view, where I get some user input</li>
<li>Display another one and get more input</li>
<li>Do some stuff with the input from 1. and 2.</li>
</ol>

<p>Problem is: presentModalViewController:animated: is <em>non blocking</em>. That means I can't just do the steps 1.-3. sequentially.</p>

<p>How I tried to solve it:</p>

<p>ViewController0 builds ViewController1 and gives him a reference to itself, then does presentModalViewController:animated:. ViewController1 will gather user input, then call a method on ViewController0 (it has the reference). That method will build ViewController2 and do the same as with the first one. ViewController2 will also call a method on ViewController0 (might even be the same one). Now ViewController0 has all the data (or should) and can proceed to step 3.</p>

<p>Problem with this approach:</p>

<ol>
<li>It looks like a horrible hack (there <em>has</em> to be a better way to do it).</li>
<li>It <em>doesn't work</em>. :-) The problem is when ViewController0 tries to display ViewController2. That one won't even get displayed. My assumption (I'm new to iPhone programming, but I did some Windows programming before) is that this operation is not done instantly, but posted somewhere for further processing (similar to the WIN32 msg queue), and so it will somehow conflict with the operation of removing ViewController1!</li>
</ol>

<p>So, any idea how I can either solve this problem in a simpler way or make it work this way?</p>
