int multiplier = 7;
int (^myBlock)(int) = ^(int num) {
return num * multiplier;
};
printf("%d", myBlock(3));
// prints "21"
^(argumentType argument) {
// dosomething
}
^{
// dosomething
}
returnType (^blockName)(argumentType);
- (void) exampleMethod: (NSString*) str1 block:(void (^)(NSString* arg1, BOOL arg2)) block;