Skip to content

yogiyo/NSOperationQueue-CompletionBlock

 
 

Repository files navigation

NSOperationQueue+CompletionBlock

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.

About

iOS 요기요 에서 사용하는 외부 라이브러리

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 91.2%
  • Ruby 8.8%