title: Replacing storyboard with XIB
body: <p>How can I replace storyboard with XIB?</p>
  
  <p>While trying to create dynamically views and their controllers, I lost all advantages of the new storyboard. Now, when trying to remove it from the project, I created a new XIB with its own controller and replaced it in project settings:<br/>
  <img src="https://i.stack.imgur.com/aX5GG.png" alt="enter image description here"><br/>
  Now, when trying to run the application, it crashes and the log shows me the following:</p>
  
  <pre><code>2012-04-08 14:50:16.567 Bazaart[11340:15203] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[&lt;UIApplication 0x8c15c20&gt; setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
  </code></pre>
  
  <p>Here is the code of: UIRootWindow:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  @interface UIRootWindow : UIViewController
  @end
  </code></pre>
  
  <p>And its corresponding implementation:</p>
  
  <pre><code>#import "UIRootWindow.h"
  @implementation UIRootWindow
  
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
      return self;
  }
  - (void)viewDidLoad {
      [super viewDidLoad];
  }
  - (void)viewDidUnload {
      [super viewDidUnload];
  }
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
      return YES;
  }
  @end
  </code></pre>
  
  <p><strong>EDIT:</strong><br/>
  I've the window as suggested by Phillip (see below). But... the way I did it is not the best, it seems. Am I doing it right?</p>
  
  <pre><code>UIRootWindow *wnd = [[UIRootWindow alloc] init];
  [wnd view];
  [self setWindow:wnd.window];
  </code></pre>