标签:
block只能用copy,用strong是没用的:
@property (nonatomic, copy) void (^hideBlock)();// 没有返回值
@property (nonatomic, copy) void (^setTitleBlock) (NSString *title);// 没有返回值,带参数
@property (nonatomic, copy) NSString *(^getTitleBlock)();// 返回值是字符串
typedef void (^StatusSuccessBlock)(NSArray *array);
typedef void (^StatusFailureBlock) (NSError *error);
@interface StatusTool : NSObject
// 邓超界:一定要注意,此处的void,代表返回值类型是block
+ (void)statusesWithSuccess:(StatusSuccessBlock)success andFailure:(StatusFailureBlock)failure;
标签:
原文地址:http://www.cnblogs.com/dengchaojie/p/4743382.html