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
delayDouble describing the duration to wait until calling the completion
backgroundClosure describing what to run on the background thread
completionClosure called when the operation on the background thread finished
View on GitHub
DispatchQueue Extension Reference