title: Create views programmatically
body: <p>I write a simple ios app. All of my views are created programmatically.
  Here is some code </p>
  
  <p>rootViewController.m</p>
  
  <pre><code>-(void)loadView
  {
    UIView *view = [[UIView alloc]initWithFrame:[UIScreen mainScreen].applicationFrame];
    self.view = view;
    self.view.backgroundColor = [UIColor greyColor];
  }
  </code></pre>
  
  <p>In appDelegate I add rootViewController view to the window and everything work fine. But if expression</p>
  
  <pre><code>self.view = view
  </code></pre>
  
  <p>is removed rootViewController is not loaded in window.
  Why is this happening ?</p>