title: Change height constraint programmatically
body: <p>I want to change the height constraint of a UITextView programmatically so I set the constraint as an outlet in my controller like this:</p>
  
  <pre><code>@property (strong, nonatomic) IBOutlet NSLayoutConstraint *descriptionHeightConstraint;
  </code></pre>
  
  <p>To change it I do the following:</p>
  
  <pre><code>self.descriptionHeightConstraint.constant = self.description.contentSize.height;
  </code></pre>
  
  <p>This works if I do it in <strong>viewDidAppear</strong> but the problem with this is that I can see how the height changes after the view displayed which is not very user friendly so I tried doing it in <strong>viewWillAppear</strong> but didn't work there, the height doesn't change. Calling <strong>setNeedsUpdateConstraints</strong> after changing the constraint didn't work either.</p>
  
  <p>Why is working in viewDidAppear and not in viewWillAppear? Any workaround?</p>
  
  <p>Thanks in advance!</p>