Skip to content

Instantly share code, notes, and snippets.

@seanhess
Created May 28, 2010 18:32
Show Gist options
  • Save seanhess/417533 to your computer and use it in GitHub Desktop.
Save seanhess/417533 to your computer and use it in GitHub Desktop.
//
// NSBlockOperation.h
// NSOperations
//
// Created by Sean Hess on 5/28/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
// Must be used with PlausibleBlocks
#import <Foundation/Foundation.h>
typedef void(^EmptyNSOperationBlock)();
@interface NSBlockOperation : NSInvocationOperation {
// only takes one
EmptyNSOperationBlock block;
}
@property (nonatomic, copy) EmptyNSOperationBlock block;
+(id)blockOperationWithBlock:(EmptyNSOperationBlock)block;
// Since we're just using invocation underneath
-(void)executeBlock;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment