Last active
October 17, 2019 14:05
-
-
Save saru2020/558a666246516aced059adce14fbb064 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
let newButtonWidth: CGFloat = 60 | |
let animator = UIViewPropertyAnimator(duration:0.3, curve: .linear) { //1 | |
self.button.frame = CGRect(x: 0, y: 0, width: newButtonWidth, height: newButtonWidth) | |
self.button.center = self.view.center | |
} | |
animator.startAnimation() //2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment