Block
block实验
block传值方式实现
//SecondViewController.h
typedef void (^ablock)(NSString *str);
//SecondViewController.h
@property (nonatomic, strong)ablock returnBlock;
//SecondViewController.h
- (void)blockMethod:(ablock)block;
//SecondViewController.m
self.returnBlock(想要传的变量);
//SecondViewController.m
- (void)blockMethod:(ablock)block{
self.returnBlock = block;
}
//FirstViewController.m
SecondViewCo
1