[OS 지식 약기]-block

2614 단어 iOS
block:
  • http://clang.llvm.org/docs/Block-ABI-Apple.html
  • http://www.arigrant.com/blog/2014/1/18/the-syntax-of-objective-c-blocks
  • int(^(^scalingFactory)(float))(double) = ^int(^(float a))(double) {
        return ^int(double b) {
            return (a+1) * b;
        };
    };
    
    int ret = scalingFactory(1)(2);
    NSLog(@"ret=%d", ret);
    

    좋은 웹페이지 즐겨찾기