Sometimes you need to reference constraints so you can modify them at a later stage. This lets you animate or remove/replace constraints.
Sometimes you need modify existing constraints inorder to animate or remove/replace constraints.
In Masonry there are two common approaches for updating constraints.
#### 1. References
You can hold on to a reference of a particular constraint by assigning the result of a constraint make expression to a local variable or a class property.
You could also reference multiple constraints by storing them away in an array. You can see a demo of this in the animation example in **Masonry iOS Examples** project.
You could also reference multiple constraints by storing them away in an array.
```obj-c
// in public/private interface
...
...
@@ -225,6 +228,28 @@ You could also reference multiple constraints by storing them away in an array.
[self.topConstraint uninstall];
```
#### 2. mas_updateConstraints
Alternatively if you are only updating the constant value of the constraint you can use the convience method `mas_updateConstraints` instead of `mas_makeConstraints`
```
// this is Apple's recommended place for adding/updating constraints
// this method can get called multiple times in response to setNeedsUpdateConstraints
// which can be called by UIKit internally or in your code if you need to trigger an update to your constraints