Quantcast
Viewing all articles
Browse latest Browse all 13

Answer by John Erck for How do I animate constraint changes?

// Step 1, update your constraintself.myOutletToConstraint.constant = 50; // New height (for example)// Step 2, trigger animation[UIView animateWithDuration:2.0 animations:^{    // Step 3, call layoutIfNeeded on your animated view's parent    [self.view layoutIfNeeded];}];

Viewing all articles
Browse latest Browse all 13

Trending Articles