zoukankan      html  css  js  c++  java
  • ios

    写法1:

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
        // Get the new view controller using [segue destinationViewController].
        // Pass the selected object to the new view controller.
        if ([segue.identifier isEqualToString:@"ProjectDetailsSegue"]) {
            ProjectDetailsViewController *detailsVC = segue.destinationViewController;
            detailsVC.idString = sender;
        }

    写法2:

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
        // Get the new view controller using [segue destinationViewController].
        // Pass the selected object to the new view controller.
        if ([[segue destinationViewController] isKindOfClass:[EZWifiConfigViewController class]]) {
            ((EZWifiConfigViewController *)[segue destinationViewController]).ssid = self.nameTextField.text;
            ((EZWifiConfigViewController *)[segue destinationViewController]).password = self.passwordTextField.text;
        }
    }
  • 相关阅读:
    java跳过构造方法新建对象
    java实现类似qq的窗口对聊
    NoSql的产生
    C语言跳出循环
    C语言for循环
    C语言while语句
    C语言条件运算符
    C语言switch语句
    C语言逻辑运算符
    C语言关系运算符
  • 原文地址:https://www.cnblogs.com/codemakerhj/p/5751744.html
Copyright © 2011-2022 走看看