Skip to content

Instantly share code, notes, and snippets.

@objectiveSee
Last active August 29, 2015 14:06
Show Gist options
  • Save objectiveSee/6ac5cd7d7a47bda932dc to your computer and use it in GitHub Desktop.
Save objectiveSee/6ac5cd7d7a47bda932dc to your computer and use it in GitHub Desktop.
I would like the interface for Block.h to support any type of block, and leave the responsibility for know the return value and parameters of a block to Controller.m
- (void)addBlock:(genericBlock)blockName;
- (blockType)getBlock;
typedef void (^EAWindowPurchaseCompletion)(id response, NSError* error);
- (void)finishWithCompletion:(EAWindowPurchaseCompletion)completion {
[blocks addBlock:completion];
}
- (void)muchLater {
EAWindowPurchaseCompletion foo = [blocks getBlock];
if ( foo ) {
foo(nil,nil);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment