首页 > 其他 > 详细

从前往后push时,将一级页面的值,传给三级页面方法

时间:2015-12-04 18:13:36      阅读:332      评论:0      收藏:0      [点我收藏+]

用属性传值时,首先将属性写在.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;

 

从前往后push时,将一级页面的值,传给三级页面方法

原文:http://www.cnblogs.com/zcl410/p/5019713.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!