I\'ve gone through the iBook from Apple, and couldn\'t find any definition of it:
Can someone explain the structure of dispatch_after?
dispatch_after
d
Simplest solution in Swift 3.0 & Swift 4.0 & Swift 5.0
func delayWithSeconds(_ seconds: Double, completion: @escaping () -> ()) { DispatchQueue.main.asyncAfter(deadline: .now() + seconds) { completion() } }
Usage
delayWithSeconds(1) { //Do something }