Hide autolayout UIView : How to get existing NSLayoutConstraint to update this one
I know how to modify a existing constraint. But I would to know if someone has found a solution to get a constraint without save this one as a property. Current solution to set Constraint height: 1) save NSLayoutConstraint in a variable: NSLayoutConstraint *heightConstraint = [NSLayoutConstraint constraintWithItem:myView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0f constant:20]; [self.view addConstraint:heightConstraint]; 2) Set the constant of the Constraint saved to "0.0" ( to hide this view)