title: IOS - External (hdmi) output fills only half the screen except when coding view manually
body: <p>So, as the title says, I have an hdmi out on the iPad  and an observer registered for screen connections, upon connection the user chooses the res and a view is outputted. </p>
  
  <p>However, if I load a view from a nib, or even from a programatic view controller, the ipad shows a landscape view in portrait (yes, both situations are set to landscape). </p>
  
  <p>I.e. </p>
  
  <pre><code>ExternalViewController *ex = [[ExternalViewController alloc] init];
  [externalWindow setRootViewController:ex];
  </code></pre>
  
  <p>does this:</p>
  
  <p><img src="https://i.stack.imgur.com/aYvQo.jpg" alt="Bad">
  If I create the view itself programatically. like so:</p>
  
  <pre><code>UIView *test = [[UIView alloc] initWithFrame:[externalScreen applicationFrame]];
  [test setBackgroundColor:[UIColor whiteColor]];
  UILabel *msgLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 40, 100, 30)];
  msgLabel.text = @"External!";
  [test addSubview:msgLabel];
  </code></pre>
  
  <p>It runs like some form of magical dream:</p>
  
  <p><img src="https://i.stack.imgur.com/13Hqz.jpg" alt="good"></p>
  
  <p>However I want the viewcontroller to load (and work!) so, StackOverflow, I ask you. has anyone come across this before?</p>
  
  <p>EDIT: It does go without saying that common sensical answers do not get a bounty, I am after a fix, not a workaround. With my limited brain, all I can think to do is create a method that creates a view based on it's inputs and adds that as a subview of the external monitor, it is clear that this is a hack solution so a fix is appreciated! Thanks!</p>
  
  <p>EDIT: </p>
  
  <pre><code>-(id)initWithFrame:(CGRect)_rect 
  {
      rect = _rect;
      if (self = [super init]) 
      {
          externalView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"105.png"]];
          externalView.alpha = 0.0;
          [externalView setFrame:rect];
          [externalView setBackgroundColor:[UIColor yellowColor]];
          self.view = [[UIView alloc] initWithFrame:rect];
          self.view.backgroundColor = [UIColor whiteColor];
  
          return self;
      }
  }
  
  - (void)loadView
  {
      self.view = [[UIView alloc] initWithFrame:rect];
      self.view.backgroundColor = [UIColor blackColor];
      [self.view addSubview:externalView];
  }
  </code></pre>
  
  <p>As requested, this is how I am loading the viewcontroller, initialising with the size of the external screen. Thanks </p>