zoukankan      html  css  js  c++  java
  • 从前往后push时,将一级页面的值,传给三级页面方法

    用属性传值时,首先将属性写在.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;
    一个人,一片天,一条路,一瞬间!
  • 相关阅读:
    day24<多线程>
    day23<File类递归练习>
    day22<IO流+>
    day21<IO流+&FIle递归>
    day20<IO流>
    day19<异常&File类>
    day18<集合框架+>
    day17<集合框架+>
    R语言中的标准输入,输出, 错误流
    Perl Spreadsheet::WriteExcel 模块自动生成excel 文件
  • 原文地址:https://www.cnblogs.com/zcl410/p/5019713.html
Copyright © 2011-2022 走看看