Created
June 7, 2018 23:02
-
-
Save deda9/bef4906eeaed9801215241c582799672 to your computer and use it in GitHub Desktop.
How to create NSOperationQueue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let operationQueue1 = OperationQueue.init() | |
let operation1 = BlockOperation.init() | |
operation1.addExecutionBlock { | |
print("I am operation execution block injected in the operation1") | |
} | |
operationQueue1.addOperation(operation1) | |
operationQueue1.addOperation { | |
print("I am operation execution block injected direct to queue by operation") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment