Skip to content

Instantly share code, notes, and snippets.

@thebrankoo
thebrankoo / TBAsyncOperation.swift
Last active June 14, 2016 15:19
Simple custom NSOperation subclass that handles piece of work with completion block
import UIKit
typealias TBAsyncBlock = (completionHandler: dispatch_block_t ) -> Void
class TBAsyncOperation: NSOperation {
private var block : TBAsyncBlock!
private var _executing : Bool = false
override var executing : Bool {