DispatchQueue
-
http://stackoverflow.com/a/40997652/2984775 Method that does something a background thread, then calls a completion after a delay
Declaration
Swift
static func background(delay: Double = 0.0, background: (()->Void)? = nil, completion: (() -> Void)? = nil)
Parameters
delay
Double describing the duration to wait until calling the completion
background
Closure describing what to run on the background thread
completion
Closure called when the operation on the background thread finished