I\'ve gone through the iBook from Apple, and couldn\'t find any definition of it:
Can someone explain the structure of dispatch_after
?
d
Now more than syntactic sugar for asynchronous dispatches in Grand Central Dispatch (GCD) in Swift.
add Podfile
pod 'AsyncSwift'
Then,you can use it like this.
let seconds = 3.0
Async.main(after: seconds) {
print("Is called after 3 seconds")
}.background(after: 6.0) {
print("At least 3.0 seconds after previous block, and 6.0 after Async code is called")
}