gpt4 book ai didi

ios - 1 等舱的值(value),而非 2 等舱的值(value)

转载 作者:行者123 更新时间:2023-11-29 04:07:39 24 4
gpt4 key购买 nike

我有两个类(class),Step1 和 Step2。 Step1 包含一个名为 wrp 的文本字段。当用户在步骤 1 中在 wrp 中输入数字时,我希望能够在步骤 2 中使用它。这是我尝试过的(这是第 2 步中的代码):

int AdditionalDays;

Step1ViewController *wrp1 = [Step1ViewController new];
UITextField *wrp = [wrp1 wrp];
AdditionalDays = [wrp.text intValue];

TotalTotal.text = [[NSString alloc] initWithFormat:@"%i", AdditionalDays];

应用程序不会抛出错误消息,但在步骤 1 中的 wrp 中用户输入的数字在步骤 2 中会被忽略。我不知道为什么它不起作用。有什么建议吗?

最佳答案

因为你创建了一个新的Step1ViewController

关于ios - 1 等舱的值(value),而非 2 等舱的值(value),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14949171/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com