gpt4 book ai didi

iphone - 以编程方式禁用 Alertview

转载 作者:行者123 更新时间:2023-11-28 23:10:46 36 4
gpt4 key购买 nike

我想在没有按钮的 AlertView 中显示一个事件指示器,我想在事件指示器停止动画时禁用它。

最佳答案

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
UIActivityIndicatorView *progress= [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 50, 30, 30)];
progress.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
[alert addSubview:progress];
[progress startAnimating];
[alert show];
[progress release];

然后关闭警报 View 和微调器:(您需要使警报 View 成为成员)

[alert dismissWithClickedButtonIndex:0 animated:YES];
[alert release];

关于iphone - 以编程方式禁用 Alertview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8308137/

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