Last active
August 29, 2015 14:06
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)addBlock:(genericBlock)blockName; | |
- (blockType)getBlock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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