Last active
October 17, 2019 13:55
-
-
Save saru2020/2766095e8f3c1bdc808fb3ceacdfa7b9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
UIView.animate(withDuration: 1.0, //1 | |
delay: 0.0, //2 | |
usingSpringWithDamping: 0.3, //3 | |
initialSpringVelocity: 1, //4 | |
options: UIView.AnimationOptions.curveEaseInOut, //5 | |
animations: ({ //6 | |
self.button.frame = CGRect(x: 0, y: 0, width: newButtonWidth, height: newButtonWidth) | |
self.button.center = self.view.center | |
}), completion: nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment