gpt4 book ai didi

iphone - UIAlertView 不显示

转载 作者:行者123 更新时间:2023-12-03 20:40:51 24 4
gpt4 key购买 nike

看一下下面的代码,问题是AlertView没有显示出来,即使我在调试中看到代码已被执行。

请指教。

非常感谢

埃兰

    -(void)displayABC:(id)sender
{

static int index = 0;
NSString *path = [[NSBundle mainBundle] pathForResource:@"ABC" ofType:@"plist"];
NSArray *ABCArray = [NSArray arrayWithContentsOfFile:path];
if(index < [ABCArray count])
[authButton setTitle:[ABCArray objectAtIndex:index] forState:UIControlStateNormal];
index++;


if (index > [ABCArray count]){

UIAlertView *endOfABCAlertView = [[UIAlertView alloc] initWithTitle:@"XXX" message:@"XXX" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
[self.view addSubview:endOfABCAlertView];

}
}

我使用的是最新的 Xcode 4.6.3(这是模拟器的错误吗?也许?)

最佳答案

您没有打电话:

[endOfABCAlertView show];

如果您能抽出 3 分钟时间查看标题 Displaying in Apple Documentation ,你会找到的。

关于iphone - UIAlertView 不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17131438/

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