Tag: dispatch

53 votes
20 answers
721 views
How do you trigger a block after a delay, like -performSelector:withObject:afterDelay:?

Is there a way to call a block with a primitive parameter after a delay, like using performSelector:withObject

avatar
Xavier
0 1 0 9
asked 07 September, 2021
54 votes
12 answers
1.1K views
How do I write dispatch_after GCD in Swift 3, 4, and 5?

In Swift 2, I was able to use dispatch_after to delay an action using grand central dispatch: var dispatchTim

avatar
Benton
0 1 0 9
asked 07 September, 2021
56 votes
26 answers
2.8K views
dispatch_after - GCD in Swift?

I've gone through the iBook from Apple, and couldn't find any definition of it: Can someone explain

avatar
Emilia
0 1 0 9
asked 07 September, 2021
53 votes
30 answers
1.8K views
Using a dispatch_once singleton model in Swift

I'm trying to work out an appropriate singleton model for usage in Swift. So far, I've been able to

avatar
Clarice
0 1 0 9
asked 07 September, 2021