Skip to content

Instantly share code, notes, and snippets.

@psaitu
Created July 5, 2016 13:07
Show Gist options
  • Select an option

  • Save psaitu/2ab0fae1ea7864a66da1c6bb6806a123 to your computer and use it in GitHub Desktop.

Select an option

Save psaitu/2ab0fae1ea7864a66da1c6bb6806a123 to your computer and use it in GitHub Desktop.
to.view.center = offsetCenter
container.addSubview(to.view)
UIView.animateWithDuration(transitionDuration(transitionContext), delay: 0.0, usingSpringWithDamping: 1.0, initialSpringVelocity: 0.0, options: .CurveLinear, animations: {
from.view.alpha = 0.5
to.view.center = from.view.center
}, completion: {
finished in
transitionContext.completeTransition(true)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment