Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created May 15, 2020 16:22
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 stevencurtis/e37df31c6f653b1476828e51f7a56493 to your computer and use it in GitHub Desktop.
Save stevencurtis/e37df31c6f653b1476828e51f7a56493 to your computer and use it in GitHub Desktop.
animationviewDidAppear
NSLayoutConstraint.deactivate([
self.coverBottomConstraint
])
let newBottomConstraint = self.coverView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -100)
NSLayoutConstraint.activate([
newBottomConstraint
])
UIView.animate(withDuration: 5.0, animations: {
self.coverView.alpha = 0.0
self.coverBottomConstraint = newBottomConstraint
self.view.layoutIfNeeded()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment