title: viewDidLayoutSubviews is getting called infinitely after switching to xcode 6
body: <p>My perfectly working iOS app stopped working properly after switching to xcode 6. I found out that in one of my view controllers viewDidLayoutSubviews method is getting called infinitely until the memory level reaches to some point when the app is crashing due to that.</p>
  
  <p>Does anyone have any ideas why this might be happening? I also noticed that some of my views started to look weird after switching to xcode 6, but I fixed those issues in storyboard.</p>
  
  <p>Any kind of help is highly appreciated!</p>
  
  <p>EDIT 1.</p>
  
  <pre><code>-(void)viewDidLayoutSubviews
  {
      [super viewDidLayoutSubviews];
  
      if (self.showsPlayerControls == NO) {
          self.playerControlsView.hidden = YES;
          CGRect graphFrame = self.view.bounds;
  
          graphFrame.size.height = graphFrame.size.height - 20.0f;
          graphFrame.origin.y = 20.0f;
  
          self.graphView.frame = graphFrame;   
      }
  
      [self.graphView reloadData];
  }
  </code></pre>
  
  <p>EDIT 2.</p>
  
  <p>My fix is the following, basically move my code to viewWillAppear.</p>
  
  <pre><code>-(void)viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
  
      if (self.showsPlayerControls == NO) {
          self.playerControlsView.hidden = YES;
          CGRect graphFrame = self.view.bounds;
  
          graphFrame.size.height = graphFrame.size.height - 20.0f;
          graphFrame.origin.y = 20.0f;
  
          self.graphView.frame = graphFrame;
      }
  
      [self.graphView reloadData];
  }
  </code></pre>
  
  <p>Is this a good equivalent of what I want to achieve ? </p>