--
1、作为变量
//1
返回值类型 (^block的名称)(参数类型) = ^返回值类型(参数) {...};
//2
returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...};
2、作为属性
//1
@property (nonatomic, copy) 返回值类型 (^block的名称)(参数类型);
//2
@property (nonatomic, copy) returnType (^blockName)(parameterTypes);
3、作为方法声明的参数
//1
- (void)方法名:(返回值类型 (^)(参数类型))block的名称;
//2
- (void)someMethodThatTakesABlock:(returnType (^)(parameterTypes))blockName;
4、作为方法实现的参数
//1
[对象/类 方法名:^返回值类型 (参数) {...}];
//2
[someObject someMethodThatTakesABlock:^returnType (parameters) {...}];
5、作为typedef
//1
typedef 返回值类型 (^类型名称)(参数类型);
类型名称 block的名称 = ^返回值类型(参数) {...};
//2
typedef returnType (^TypeName)(parameterTypes);
TypeName blockName = ^returnType(parameters) {...};