正向传值:由前一个控制器向跳转的控制器传值
一、现在接收者中的.h文件中公开声明一个属性
@property (nonatomic,copy) NSString *userName;
二、在发送者中导入接收者的头文件,并使用接收者创建出一个对象
//1、导入头文件
#import "TestViewController.h"
//2、实例化对象
TestViewController *testVC = [[TestViewController alloc] init];
//3、进行传值
testVC.userName = @"123";
这样的使用已经把发送者中的"hehe"传递给了接收者中的userName参数。