I've got two two text fields displayNameTF and emailTF.
I'm wanting to animate one text field to go over the top of the other one.
displayNameTF.center = emailTFOrigin
UIView.animate(withDuration: 0.3) {
self.view.layoutIfNeeded()
}
I've stored the center of the emailTF in the emailTFOrigin and I'm setting the center of the displayNameTF to it and animating layoutIfNeeded.
The animation I get with this is the text fields by default are about 5 points away from eachother , the displaynameTF hops directly ontop of the emailTF, and animates back up to its original position.
The animation I'm looking to have happen is the displayNameTF animates down ontop of the email. Right now it's animating back up to its original position from the emailTF.
How can I accomplish having the top TF animate down ontop of the bottom TF if there are constraints in play?