用属性传值时,首先将属性写在.h中
在一级页面中:
stringCL是二级页面中暂时存放这个值的对象
self.phoneNumTF.text是一级页面要传的值
self.identificationVC=[[IdentificationViewController alloc] initWithNibName:@"IdentificationViewController" bundle:nil]; _identificationVC.stringCL=self.phoneNumTF.text; [self.navigationController pushViewController:self.identificationVC animated:YES];
在二级页面跳转到三级页面时
userPhoneNum暂时存放传过来的值
PerfectInformationViewController *perfectinformationVC=[[PerfectInformationViewController alloc] initWithNibName:@"PerfectInformationViewController" bundle:nil]; perfectinformationVC.userPhoneNum=_stringCL; [self.navigationController pushViewController:perfectinformationVC animated:YES];
在三级页面
将userPhoneNum中存放的值,传给需要的对象
self.userPhoneNumberLab.text=self.userPhoneNum;