//有页面A和页面B
//页面A跳转到B
// 页面B 返回 并传值给A
//A页面跳转B 不传值仅跳转
A页面 代码
//.h
#import <UIKit/UIKit.h>
@interface ViewControllerA : UIViewController
@end
#import "ViewControllerA.h"
//把界面B的头文件引入
#import "ViewControllerB.h"
//添加代理
@interface ViewControllerA ()<ViewControllerBDelegate>
@property (nonatomic,strong) UILabel *labelShow;
@end
@implementation ViewControllerA
- (void)viewDidLoad {
[super viewDidLoad];
//创建Button
UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(100, 200, 100, 40)];
//设置button的名字
[button setTitle:@"跳转页面B" forState:UIControlStateNormal];
//设置Button的名字颜色
[button setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
//设置button点击事件
[button addTarget:self action:@selector(btnPress) forControlEvents:UIControlEventTouchUpInside];
//将Button显示到页面上
[