Reputation: 2159
void (^block)();
void (^block1)(int);
The first line declare a block.
The second line declare a block that takes an integer argument.
Now I want a block that accepts another block as an argument:
void (^block2)(<another block>);
How would I do so?
Upvotes: 3
Views: 117
Reputation: 523294
Use a typedef, e.g.
typedef void (^BlockTypeToAccept)();
void (^block)(BlockTypeToAccept inner_block);
or combine them directly:
void (^block)( void (^inner_block)() );
Upvotes: 8