Skip to content

Instantly share code, notes, and snippets.

@usagimaru
Last active August 9, 2018 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usagimaru/5b140b9d3ffd85b179b73daa329bd6dc to your computer and use it in GitHub Desktop.
Save usagimaru/5b140b9d3ffd85b179b73daa329bd6dc to your computer and use it in GitHub Desktop.
Tips of a motion like iOS system transition.
// 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