Skip to content

Instantly share code, notes, and snippets.

@satindar
Created October 25, 2016 16:57
Show Gist options
  • Save satindar/47b2bf86fcd98427ba80753029705e14 to your computer and use it in GitHub Desktop.
Save satindar/47b2bf86fcd98427ba80753029705e14 to your computer and use it in GitHub Desktop.
Useful animation code
// Delay function
func delay(_ seconds: Double, completion: @escaping ()->Void) {
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .milliseconds(Int(seconds * 1000.0))) {
completion()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment