Is it possible to specify a method block parameter in Objective-C without using a typedef? It must be, like function pointers, but I can't hit on the winning syntax without using an intermediate typedef:
typedef BOOL (^PredicateBlock_t)(int);
- (void) myMethodTakingPredicate:(PredicateBlock_t)predicate
only the above compiles, all these fail:
- (void) myMethodTakingPredicate:( BOOL(^block)(int) ) predicate
- (void) myMethodTakingPredicate:BOOL (^predicate)(int)
and I can't remember what other combinations I've tried.
- ( void )myMethodTakingPredicate: ( BOOL ( ^ )( int ) )predicate