How to reference THE UIWindow from sub UIViewControllers?
<p>I am trying to add another subview programmatically based on some event (user taps a button, for instance).</p>

<p>My problem is that I am having problems referencing the (one and only) instance of UIWindow. I reach it from my appDelegate, because the MainWindow.xib and the appDelegate have been wired up. But I cannot reach the UIWIndow from anywhere else (I cannot draw that connection in IB, can I?)</p>

<p>What techniwue is preferred to get a reference to (the one and only) UIWindow? ...so that I in turn can use the following code from my various UIViewControllers:</p>

<pre><code>[myOneAndOnlyWindow addSubview:oneOfManyViews.view];
[myOneAndOnlyWindow makeKeyAndVisible];
</code></pre>
