iphone:Sliders
出自UXGuide.net
请帮助我们修订和更新本文的译文部分
本文的译文部分可能是由多个贡献者提供或从不同的渠道收集,未经过最终审阅和整理,请您帮助我们一起修订和更新本文的译文部分。
滑块
Sliders
A slider allows users to make adjustments to a value or process throughout a range of allowed values. When users drag a slider, the value or process is updated continuously. Figure 9-12 shows an example of a slider with minimum and maximum images.
滑块允许用户在整个允许值的范围内调整一个数值或进程。当用户拖动一个滑块,数值或进程一会随之不断更新。图9-12显示了一个最大和最小的图像滑块的例子。
Figure 9-12 A slider
图9-12 滑块
Sliders are useful in two main situations:
滑块主要在下面这两种情况使用:
- When you want to allow users to have fine-grained control over the values they choose
- 你想让用户对他们选择的值进行精确的控制
- When you want to allow users to have fine-grained control over the current process
- 你想让用户对当前过程进行精确的控制
A slider consists of a track, a thumb, and optional right and left value images. Figure 9-13 shows these parts of a slider.
滑块由一个轨道,thumb和可选的左,右数值图像组成。图9-13显示了一个滑块这些部分。
Figure 9-13 Four parts of a slider
图9-13 滑块的四部分
You can set the width of a slider to fit in with the user interface of your application. In addition, you can display a slider either horizontally or vertically.
你可以设置滑块的宽度,以适应你的应用程序用户界面。此外,你可以设定水平或垂直显示滑块。
There are several ways to customize a slider:
有几种方法定制一个滑块:
- You can define the appearance of the thumb, so users can see at a glance whether the slider is active.
- 你可以定义thumb的外观,让使用者对滑块是否处于活动状态一目了然。
- You can supply images to appear at either end of the slider (typically, these correspond to minimum and maximum values), to help users understand what the slider does.
- 你可以在滑块的任一端提供图片(通常,这些对应的最小和最大值),以帮助用户了解滑块的作用。
- A slider that controls font size, for example, could display a very small character at the minimum end and a very large character at the maximum end.
- 例如,一个用于控制字体大小的滑块,可以在最小值的一端显示一个非常小的字体,在最大值的一端显示比较大的字体。
- You can define a different appearance for the track, depending on which side of the thumb it is on and which state the control is in.
- 你可以定义一个不同外观的轨道,这取决于它在thumb的那一端以及控件所处的状态。
To learn more about using a slider in your code, see UISlider Class Reference.
要了解更多有关在代码中使用滑块的信息,请参阅 UISlider 类型参考。