dispatch_block_t

dispatch_block_t block = ^{
        curIndexPath = [album indexPathForVid:curVideoItem.vid site:curVideoItem.site];
        mutableArray = [NSMutableArray array];
        if (curIndexPath) {
            NSArray *array = [album videoItemsOfPageIndex:curIndexPath.page];
            int count = (int)array.count;
            for (int i = (int)curIndexPath.index; i < count; i++) {
                VideoItem *vitem = array[i];
                if (vitem.tvIsVr > 0) {
                    break;
                }
                [mutableArray addObject:vitem];
            }
        } else {
            [mutableArray addObject:curVideoItem];
        }
    };
typedef void (^dispatch_block_t)(void);
Description 
The prototype of blocks submitted to dispatch queues, which take no arguments and have no return value.
The declaration of a block allocates storage on the stack. Therefore, this example demonstrates an invalid construct:

说白了就是一个语法糖 GCD为我们声明了一个没有参数 没有返回值的block

你可能感兴趣的:(dispatch_block_t)