首页 > 代码库 > ios block

ios block

//定义一个blocks变

  1. int (^myblocks2) (int a, int b) = ^(int a, int b) {
  2. int c = a + b;
  3. return c;
  4. };  
  //向外暴露一个接口-(void) setBark:( void (^) (Dog *thisDog, int count) ) eachBark;   

 

ios block