gpt4 book ai didi

ios - UILabel 中的文本不会添加到单独的 View Controller 数组中

转载 作者:行者123 更新时间:2023-11-29 02:44:48 25 4
gpt4 key购买 nike

我有一个 NSMutableArray,我想在子类 UIAlertView 中添加输入到 UILabel 的值,这允许我添加 subview 。问题是我必须跟踪分数的 UIViewController 没有收到输入的值,因为它不断返回 Nil 值。

UIAlertVIew Controller 中,我使用 NSNotificationCenter 发布通知。保存分数的 UIViewController 有一个检查更新的监听器。

这是 IViewController 听到通知时调用的方法的代码

-(void)doneButtonPressed{
i++;
// g2RowIndex ++;
j = i -2;
k = i-3;
CustomUiAlertView *customAlertView;
NSLog(@"%@", customAlertView.p1G1ScoreLabel.text);

}

scoreLabel 属于子类 UIViewController。我想知道如何将 UILabel 中的输入值放置在 socreViewController 中的 scoreArray 中。

最佳答案

您需要分配/初始化 CustomUiAlertView。

关于ios - UILabel 中的文本不会添加到单独的 View Controller 数组中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25281296/

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