Last active
December 31, 2016 06:56
-
-
Save saoudrizwan/ea9d564d27733efb58dde06c9b4ccf7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linesConvergingAnimation = UIViewPropertyAnimator(duration: 0.2, curve: UIViewAnimationCurve.linear, animations: { | |
// Set the new constraints | |
self.firstLine.snp.remakeConstraints({ (make) in | |
make.height.equalTo(self.lineHeight) // constant | |
make.width.equalTo(self.containerView.snp.width) | |
make.centerX.equalTo(self.containerView.snp.centerX) | |
make.centerY.equalTo(self.containerView.snp.centerY) | |
}) | |
self.thirdLine.snp.remakeConstraints({ (make) in | |
make.height.equalTo(self.lineHeight) // constant | |
make.width.equalTo(self.containerView.snp.width) | |
make.centerX.equalTo(self.containerView.snp.centerX) | |
make.centerY.equalTo(self.containerView.snp.centerY) | |
}) | |
// Apply the new constraints on the view | |
self.view.layoutIfNeeded() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment