iphone:Activity-indicators
出自UXGuide.net
请帮助我们修订和更新本文的译文部分
本文的译文部分可能是由多个贡献者提供或从不同的渠道收集,未经过最终审阅和整理,请您帮助我们一起修订和更新本文的译文部分。
活动指示器
Activity Indicators
An activity indicator shows the progress of a task or process that is of unknown duration. If you need to display progress for a task of known duration, use a progress view instead (see “Progress Views” for more information about this control). The “spinning gear” appearance of the activity indicator shows users that processing is occurring, but does not suggest when it will finish.
一个活动指示显示了一项任务的进度,或是一个持续时间不明的进程。如果你需要显示一个已知时间的任务进度,使用进度视图(详细信息请参见 “进度视图” )。以“spinning gear”方式显示的活动指示向用户说明了,正在处理中,但并不能说明何时会完成。
Figure 9-1 shows two types of activity indicators. The activity indicator in the status bar is the network activity indicator; it should be displayed when your application accesses the network for more than a couple of seconds. The larger activity indicator in the toolbar should be displayed if it will take more than a second or two for your application to perform the current task.
图9-1显示了两种类型的活动指示。在状态栏里的活动指示是一个网络活动指示,它应在你的应用程序访问网络超过几秒钟后显示。工具栏上的较大的活动指示应在你的应用程序执行当前任务超过1秒或2秒时显示。
Figure 9-1 Two types of activity indicators
图9-1 两种类型的活动指示
An activity indicator is a good feedback mechanism to use when it’s more important to reassure users that their task or process has not stalled than it is to suggest when processing will finish.
一个活动指示是一个很好的反馈机制,它在让用户确认它们的任务或进程并没有停滞不前时使用,比在告知用户处理即将完成时使用,起到更为重要的作用。
You can choose the size and color of an activity indicator to coordinate with the background of the view in which it appears. By default, an activity indicator is white.
你可以选择一个活动指示的大小和颜色,以适应使用它的视图的背景。默认情况下,活动指示是白色的。
An activity indicator disappears when the task or process has completed. This default behavior is recommended, because users expect to see an activity indicator when something is happening and they associate a stationary activity indicator with a stalled process.
一个活动指示在任务或进程已完成时就会消失。这种默认行为是被推荐的,因为用户希望当有事情发生时看到一个活动指示,他们会把一个停止活动指示与一个已经停止的进程联系起来。
To learn how to display the network activity indicator, see the networkActivityIndicatorVisible method in UIApplication Class Reference. To learn how to display the larger, non-network activity indicator in your code, see UIActivityIndicatorView Class Reference.
要了解如何显示网络活动指示,请参阅 UIApplication 类型参考中的 networkActivityIndicatorVisible 方法。要了解如何在代码中显示较大的,非网络活动指示,见 UIActivityIndicatorView 类型参考。