B页面
typedef void (^ReturnTextBlock)(NSString *showText);
@interface SelectReasonViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIButton *btn1;
@property (weak, nonatomic) IBOutlet UIButton *btn2;
@property (weak, nonatomic) IBOutlet UIButton *btn3;
@property (weak, nonatomic) IBOutlet UIButton *btn4;
@property (nonatomic, copy) ReturnTextBlock returnTextBlock;
- (void)returnText:(ReturnTextBlock)block;
@end
.m- (void)returnText:(ReturnTextBlock)block {
self.returnTextBlock = block;
}
- (IBAction)btn1Action:(id)sender{
self.returnTextBlock(@"缺货");
[self.navigationController popViewControllerAnimated:YES];
}
//选择退款理由
- (IBAction)selectReasonAction:(id)sender {
SelectReasonViewController *select = [[SelectReasonViewController alloc] init];
[select returnText:^(NSString *showText) {
[self.selectResonBtn setTitle:showText forState:UIControlStateNormal];
}];
[self.navigationController pushViewController:select animated:YES];
}