Return_Type (^ Block_Name) (Parameters)
void (^ x) (void) = ^{
NSLog(@"block--without--parameter--without--returntype");
};
NSLog(@"block--without--parameter--without--returntype");
};
void (^ xx) (int) = ^(int a){
NSLog(@"bloc--with-one-parameter--without--returnType -- %d", a);
};
NSLog(@"bloc--with-one-parameter--without--returnType -- %d", a);
};
void (^ xxx) (int, NSString *) = ^(int a, NSString *s){
NSLog(@"block--with-two-parameters--without--returnType - %d -- %@", a, s);
};
NSLog(@"block--with-two-parameters--without--returnType - %d -- %@", a, s);
};
NSString* (^ xxxx) (int, NSString *) = ^(int a, NSString *s){
NSString *ss = [NSString stringWithFormat:@"block--with--parameters--and--returntype %@ - %d", s, a];
return ss;
};