Created
June 7, 2018 20:22
-
-
Save deda9/3c30a9ccd64bc6c5f713ae37f00e7a16 to your computer and use it in GitHub Desktop.
How to inject new block to created Operation
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 operation = BlockOperation.init() | |
let operationBlock1 = { | |
print("I am operation Block One") | |
} | |
let operationBlock2 = { | |
print("I am operation Block Two") | |
} | |
operation.addExecutionBlock { | |
operationBlock1() | |
} | |
operation.addExecutionBlock { | |
operationBlock2() | |
} | |
operation.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment