NSBlockOperation

NSBlockOperation是NSOperation的子类,以block的方式添加任务。

1 Managing the Blocks in the Operation

/// 初始化NSBlockOperation
public convenience init(block: () -> Void)

/// 添加blcok
public func addExecutionBlock(block: () -> Void)

/// 需要执行的block
public var executionBlocks: [() -> Void] { get }

 

Appendix

Sample Code

Swift

NSOperation Class Reference

Concurrency Programming Guide

Revision History

时间 描述
2016-03-09 博文完成

CSDN:http://blog.csdn.net/y550918116j

GitHub:https://github.com/927337973/Blog

你可能感兴趣的:(NSBlockOperation)