1,声明
typedefvoid(^XXXComplention) (id * XXX,NSError*error);
2,声明变量
@property (copy) BlockType myBlock;
@property (nonatomic, copy) void(^textBlock) (NSString*text); // 字符串回调
3,在实例方法中使用
- (void)fetchReceiptsInfoWithHander:(MemberReceiptsRequestHander)requestHander;
- (void)fetchCloudInfoWithComplention:(MemberRequestHander)requestHander {
__blockMemberRequestHandertHander = requestHander;
if(tHander)
tHander(XXX, error);
}
}
网友评论