let operationQueue = DownloadOperationQueue()
let blockOperation1 = NSBlockOperation {
// Do Stuff
}
// Custom NSOperation
let downloadOperation1 = DowloadImageOperation(stringURL: imageURLs[0], delegate: self)
// Set your completion block
self.operationQueue.completionBlock = {
print("All finished!")
}
operationQueue.addOperations([blockOperation1, downloadOperation1], waitUntilFinished: false)
dannyYassine/DownloadOperationQueue
NSOperationQueue subclass fires a completionBlock when all operations are finished.
SwiftMIT