Check out example codes for "swift how to animate constraint change". It will help you in understanding the concepts better.

Code Example 1

You need to first change the constraint and then animate the update.

self.nameInputConstraint.constant = 8

UIView.animate(withDuration: 0.5) {
    self.view.layoutIfNeeded()
}

Learn ReactJs, React Native from akashmittal.com