I have a UITextField that I want to enlarge its width when tapped on. I set up the constraints and made sure the constraint on the left has the lower priority t
UITextField
Watch this.
The video says that you need to just add self.view.layoutIfNeeded() like the following:
self.view.layoutIfNeeded()
UIView.animate(withDuration: 1.0, animations: { self.centerX.constant -= 75 self.view.layoutIfNeeded() }, completion: nil)