title: iOS Autolayout has a delay before updating
body: <p>I am trying to use autolayout in my app. I have a button that changes the size and position of a UIView when it is pressed.</p>
  
  <p>I use the code below but the layout isn't updated straight away. There's a delay of about 20 seconds before the UI is updated. If I put the code inside viewDidLoad however it appears as soon as the view does. </p>
  
  <p>Is there a method that forces the layout to be updated? </p>
  
  <pre><code>NSArray *constraintArray = [NSLayoutConstraint constraintsWithVisualFormat:@"V:[_response]-335-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:viewDictionary];
  
  [self.view addConstraints:constraintArray];
  [self.view setNeedsUpdateConstraints];
  
  [UIView animateWithDuration:0.2 animations:^{
      [self.view layoutIfNeeded];
  }];
  </code></pre>