@property (nonatomic, copy) int (^block要起的变量名)(int , int);
(void)test1:(int (^)(int , int))block要起的变量名 {
int sum = block要起的变量名(10,20);
}(void)test2: {
int (^block要起的变量名)(int , int) = ^(int a,int b){
return a+b;
};
int sum = block要起的变量名(10,20);
}
@property (nonatomic, copy) int (^block要起的变量名)(int , int);
(void)test1:(int (^)(int , int))block要起的变量名 {
int sum = block要起的变量名(10,20);
}
(void)test2: {
int (^block要起的变量名)(int , int) = ^(int a,int b){
return a+b;
};
int sum = block要起的变量名(10,20);
}