多个 AlertViews - 删除另一个警报视图后面的警报视图 [英] Multiple AlertViews - Remove the alertview that is behind another alertview

查看:20
本文介绍了多个 AlertViews - 删除另一个警报视图后面的警报视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这个场景应该很奇怪,但我坚持这个.

I think this scenario should be weird one but i am stuck up with this.

我有一个视图可以说是 View1,它会显示一个或多个警报视图.如果警报未受影响,它们会一个叠放在另一个上面.问题来了.如果我单击最顶部的警报,它应该带我进入一个全新的视图,比如 View2.确实如此.现在我收到了 View2 中仍显示的剩余警报.我不希望这种情况发生.如何自动关闭从 View1 创建的当前显示在 View2 中的待处理警报?

I am having a view lets say View1, which will show one or more alertviews.Alerts are stacked one above the other if they are untouched. The problem comes here. If i click the top most alert ,it should take me to a complete new view lets say View2. And it does. Now i am getting the remaining alerts still shown in View2. I do not want this to happen . How can i auto dismiss the pending alerts created from View1 which are currently being shown in View2 ?

非常感谢任何帮助或任何想法..

Any help or any idea is really appreciated..

谢谢

推荐答案

不是您想要的问题的答案,但是...

Not quite the answer to your question that you wanted, but...

为什么会有这么多提醒?听起来您可能过度使用它们.Apple 在其人机界面指南中非常清楚您应该如何使用 UIAlerts:

Why do you have so many alerts? It sounds like you might be overusing them. Apple is quite clear in its Human Interface Guidelines about how you should use UIAlerts:

避免创建不必要的警报.

Avoid creating unnecessary alerts.

这些警报通常是不必要的如果他们:

These alerts are usually unnecessary if they:

  • 仅仅增加一些信息的可见性,尤其是相关的信息您的标准功能应用程序.

相反,你应该设计一个引人注目的显示方式与您一致的信息应用的风格.

Instead, you should design an eye-catching way to display the information that harmonizes with your app’s style.

  • 就正常进行的任务向用户更新.

相反,考虑使用进度查看或活动指示器提供与进度相关的反馈用户(这些反馈方法是在进度视图"和活动指示器").

Instead, consider using a progress view or an activity indicator to provide progress-related feedback to users (these methods of feedback are described in "Progress View" and "Activity Indicator").

  • 请求确认用户发起的操作.

要获得操作的确认用户发起的,即使是潜在的危险的操作,例如删除联系,你应该使用一个动作表.

To get confirmation for an action the user initiated, even a potentially risky action such as deleting a contact, you should use an action sheet.

  • 告知用户他们无能为力的错误或问题.

虽然可能需要使用告诉用户有关某事的警报他们无法解决的关键问题,这是更好地整合这些信息如果可能,进入用户界面.例如,而不是每次都告诉用户服务器连接失败,显示上次成功的时间连接.

Although it might be necessary to use an alert to tell users about a critical problem they can’t fix, it’s better to integrate such information into the UI, if possible. For example, instead of telling users every time a server connection fails, display the time of the last successful connection.

如果您过度使用警报:不要.那么你原来的问题可能就没有意义了.

If you're overusing alerts: don't. Then your original question may become moot.

这篇关于多个 AlertViews - 删除另一个警报视图后面的警报视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆