一.block
先声明block
<1>声明block
typedef void(^myBlock)(NSString *name);
//<2>声明一个block属性
@property (nonatomic, copy) myBlock block;
//<3>调用block、传值
if (self.block) {
self.block(@"123");
}
//<4>实现block
//a:NSS
一.block
先声明block
<1>声明block
typedef void(^myBlock)(NSString *name);
//<2>声明一个block属性
@property (nonatomic, copy) myBlock block;
//<3>调用block、传值
if (self.block) {
self.block(@"123");
}
//<4>实现block
//a:NSS