Skip to content

Instantly share code, notes, and snippets.

@rednebmas
Created December 3, 2017 08:23
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 rednebmas/7872ede802c811cc1f17232c007e760a to your computer and use it in GitHub Desktop.
Save rednebmas/7872ede802c811cc1f17232c007e760a to your computer and use it in GitHub Desktop.
Window pop animation
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
let window = UIApplication.shared.windows[0]
UIView.animate(withDuration: 0.25, animations: {
window.transform = CGAffineTransform(scaleX: 1.1, y: 1.1)
}, completion: { (completed) in
UIView.animate(withDuration: 0.25, animations: {
window.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
}, completion: { (completed) in
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment