title: Nib loading creates wrong frame size
body: <p>I'm trying to create an overlay that asks for the user's email, and I designed it using a nib, with its own custom UIView class. The overridden instantiation method loods like this </p>
  
  <pre><code>-(instancetype)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame: frame];
      if (self)
      {
          self = [[[NSBundle mainBundle] loadNibNamed:@"EmailOverlayView" owner: self options: nil] firstObject];
      }
  
      return self;
  }
  </code></pre>
  
  <p>But whenever I try to instantiate the view within the view controller (these are all nib loaded as well, no storyboards) no matter what values for the width and height I put in, the view completely ignores them and either puts in 600x600 if I use size classes, or the incorrect frame sizes if I don't use size classes, which is incredibly aggravating. I created the view in viewDidAppear and logged out the values to illustrate what I mean. </p>
  
  <pre><code>NSLog(@"%f, %f", self.view.frame.size.width, self.view.frame.size.height); --&gt; 320.000000, 519.000000
  CPREmailOverlayView *overlay = [[CPREmailOverlayView alloc] initWithFrame: CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; 
  [overlay layoutIfNeeded];
  NSLog(@"%f, %f", overlay.frame.size.width, overlay.frame.size.height); --&gt; 320.000000, 568.000000
  [self.view addSubview: overlay];
  [self.view bringSubviewToFront: overlay];
  </code></pre>
  
  <p>It's incredibly aggravating that you create a view using specific values, then the system changes them behind your back, so any help would be greatly appreciated as I would rather not create all these views programmatically. </p>