How do I remove a view controller from my view hierarchy?
<p>My app has a welcome screen that can only be shown in portrait mode. After the user has tapped through the welcome screen I'd like to show another screen that can be used in both portrait mode and landscape.</p>

<p>I have set up a view controller that implements <code>shouldAutorotateToInterfaceOrientation:</code> returning <code>YES</code> only for <code>UIInterfaceOrientationPortrait</code>, and I add the view to the window with <code>[window addSubView:view]</code>. I tag this view with the tag <code>1</code>.</p>

<p>When the user taps through the welcome view and the app moves on to the new view I do:</p>

<pre><code>[[window viewWithTag:1] removeFromSuperView];
[window addSubView:myViewController.view];
</code></pre>

<p>Where myViewController is an instance of the 2nd view's view controller (that handles the <code>shouldAutorotateToInterfceOrientation</code> method properly).</p>

<p>Now when I rotate, it still calls <code>shouldAutorotateToInterfceOrientation</code> on the original view's view controller, and does not call it on the new view's view controller. </p>

<p><a href="http://developer.apple.com/library/ios/#qa/qa2010/qa1688.html" rel="nofollow">This note from Apple</a> says that only one view controller will get rotation notifications; however, I have removed the other view controller. </p>

<p>What am I doing wrong?</p>
