Latest 1.0.0
Homepage https://github.com/devxoul/NSOperationQueue-CompletionBlock
License MIT
Platforms ios 3.1, requires ARC
Frameworks Foundation
Authors

Build Status
CocoaPods

Completion block for NSOperationQueue.

At a Glance

Swift

import NSOperationQueue_CompletionBlock

let queue = NSOperationQueue()
queue.completionBlock = {
    NSLog("I'm done!")
}
queue.addOperationWithBlock {
    NSLog("I am an operation.")
}

Objective-C

#import <NSOperationQueue_CompletionBlock/NSOperationQueue+CompletionBlock.h>

NSOperationQueue *queue = [[NSOperationQueue alloc] init];
queue.completionBlock = ^{
    NSLog(@"I'm done!");
};
[queue addOperationWithBlock:^{
    NSLog(@"I am an operation.");
}];

Output

I am an operation.
I'm done!

Installation

I recommend you to use CocoaPods, a dependency manager for Cocoa.

Podfile

pod 'NSOperationQueue+CompletionBlock', '~> 1.0'

License

NSOperationQueue+CompletionBlock is under MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "NSOperationQueue+CompletionBlock",
    "version": "1.0.0",
    "summary": "A missing completionBlock for NSOperationQueue.",
    "homepage": "https://github.com/devxoul/NSOperationQueue-CompletionBlock",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "devxoul": "[email protected]"
    },
    "source": {
        "git": "https://github.com/devxoul/NSOperationQueue-CompletionBlock.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "3.1"
    },
    "requires_arc": true,
    "source_files": "NSOperationQueue+CompletionBlock/NSOperationQueue+CompletionBlock.{h,m}",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This