Last active
August 29, 2015 14:06
-
-
Save mathewsanders/3f557b632f9be8180d2c to your computer and use it in GitHub Desktop.
animateWithDuration and delay
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
let openAnimationDuration = 0.5 | |
let numberOfSecondsToPresent = 1 | |
let closeAnimationDuration = 0.5 | |
UIView.animateWithDuration(openAnimationDuration, animations: { | |
// do changes to animate showing the popover here... | |
}, completion: { finished in | |
UIView.animateWithDuration(closeAnimationDuration, delay: numberOfSecondsToPresent, options: nil, animations: { | |
// do changes to animate hiding the popover here... | |
}, completion: nil) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment