^ {
// block code here
}
If you want to accept a block as a method parameter, you can type out the cryptic syntax, but it's not very easy to read (or write).
This method accepts a block. The block accepts a BOOL parameter and must return an NSString.
- (void)someMethodWithBlock:(NSString * (^)(BOOL))block;
To make this more usable elsewhere in the code, you can use a typedef instead. Put this somewhere in your header file:
typedef NSString * (^CrazyBlock)(BOOL animated);
Then you can update where it's used:
- (void)someMethodWithBlock:(CrazyBlock)block;