Oepration

class Operation : NSObject

Operation 만들기

class BlockOperation : Operation
let operation = BlockOperation {
    // some code
}

// BlockOperation의 메서드
operation.addExecutionBlock {
    // some code to be executed after the operation.
}

// Operation의 프로퍼티
operation.completionBlock = {
    // some code to be executed after the operation and executionBlocks
}

Operation 실행하기