Last active
August 9, 2018 09:03
-
-
Save usagimaru/5b140b9d3ffd85b179b73daa329bd6dc to your computer and use it in GitHub Desktop.
Tips of a motion like iOS system transition.
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
// https://qiita.com/usagimaru/items/4306f261457e82641e4a | |
UIView.perform(.delete, | |
on: [], | |
options: [.beginFromCurrentState, .allowUserInteraction], | |
animations: { | |
aView.frame = targetFrame | |
}, | |
completion: nil) | |
or | |
UIView.animate(withDuration: 0.5, | |
delay: 0, | |
usingSpringWithDamping: 1.0, | |
initialSpringVelocity: 0, | |
options:[.beginFromCurrentState, .allowUserInteraction], | |
animations: { | |
aView.frame = targetFrame | |
}, | |
completion: nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment