参考链接:https://www.jianshu.com/p/62ea7bb79b58 OC Block 定义 作为参数 * (void)pingSingleWithHost:(NSString *)host block:(void(^ _Nullable)(BOOL, NSString *, NSUInteger))block; * 作为属性1 @property (copy) void(^pingStrFinishBlock)(BOOL success, NSString *host, NSUInteger finishCount); 作者:glView 作为属性2 typedef void (^CancleBlock)(void); ///取消回调 @property (nonatomic, copy) CancleBlock cancleBlock;