title: Setting "edgesForExtendedLayout = UIRectEdgeNone" does not prevent my subview from moving up in iOS 7
body: <p>I have a view controller that was written back in the days of iOS 5 and I'm trying to transition it to iOS 7. After reading the iOS 7 transition guide and poking around on SO, I discovered that I need to set the new iOS 7 property <code>edgesForExtendedLayout</code> to <code>UIRectEdgeNone</code> to prevent one of my custom subviews from appearing 49 pixels higher on iOS 7 than it appears on iOS 6. However, after setting that property, my custom subview is still appearing 49 pixels higher on iOS 7 and I don't know what else I need to do. Here's my simple code that I added to my <code>viewDidLoad</code> method...</p>
  
  <pre><code>if ([[[UIDevice currentDevice] systemVersion] floatValue] &gt;= 7) {
      self.edgesForExtendedLayout = UIRectEdgeNone;
  }
  </code></pre>
  
  <p>and here's the code for creating and adding the custom subview that is appearing higher on iOS 7...</p>
  
  <pre><code>CGRect customControlFrameRect = {{0.0f, 240.0f}, {100.0f, 100.0f}};
  self.customControl = [[MyCustomControl alloc] initWithFrame:customControlFrameRect];
  
  self.customControl.autoresizingMask =  UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
  [self.view addSubview:self.customControl];
  </code></pre>
  
  <p>One other important detail, if it helps, is this view is created from a nib file, but the custom subview that is appearing higher on iOS 7 than iOS 6 is the only subview that is created and added programmatically in <code>viewDidLoad</code>, after I set the <code>edgesForExtendedLayout</code> property. All the other subviews that are created from the nib aren't affected regardless of the whether or not I set the <code>egdesForExtendedLayout</code> property.</p>
  
  <p>My two questions are...</p>
  
  <ol>
  <li>Why is my custom subview appearing higher on iOS 7 even after I set the edgesForExtendedLayout property to UIRectEdgeNone?</li>
  <li>Why aren't the other subviews (the subviews that are loaded from the nib) appearing higher in iOS 7?</li>
  </ol>
  
  <p>Thanks in advance for your wisdom!</p>