隐藏 UIAlertView

发布于 2024-08-05 19:37:10 字数 80 浏览 1 评论 0原文

有没有办法以编程方式隐藏 UIAlertView?我正在我的进度视图中显示进度视图,当进度视图 = 1.0 时,我想隐藏 UIAlertView。

Is there a way to hide the UIAlertView programatically. I am displaying a progress view in mine and when the progress view is = 1.0 I want to hide the UIAlertView.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

攀登最高峰 2024-08-12 19:37:10

您可以做的是观察(使用键值观察)进度视图中的 progress 属性,然后当它达到 1.0 时,将 dismissWithClickedButtonIndex:animated: 消息发送到警报看法。

What you can do is observe (using key-value observing) the progress attribute in your progress view, then when it hits 1.0 send the dismissWithClickedButtonIndex:animated: message to the alert view.

素罗衫 2024-08-12 19:37:10

我会使用 UIActionSheet 来执行这种行为。用户被训练手动关闭 UIAlertView,这只会让他们感到困惑。

UIActionSheets 是高度可定制的,可以满足您的任何需求。

I would use a UIActionSheet to do this kind of behavior. The user is trained to manually dismiss the UIAlertView and this would just confuse them.

UIActionSheets are highly customizable to do whatever you need.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文