iphone:Text-views

出自UXGuide.net

跳转到: 导航, 搜索

请帮助我们修订和更新本文的译文部分

本文的译文部分可能是由多个贡献者提供或从不同的渠道收集,未经过最终审阅和整理,请您帮助我们一起修订和更新本文的译文部分。

文本视图
Text Views

A text view is a region that displays multiple lines of text and supports scrolling when the content is too large to fit inside its bounds. Mail uses a text view to allow users to create a signature that appears at the end of each email message they compose, as shown in Figure 8-12.

文本视图是一个能够显示多行文本的区域,当内容太多而超出其适应范围时,支持滚动。邮件使用一个文本视图以便用户创建签名,签名显示在每封电子邮件的结尾处,如图8-12所示。

Figure 8-12  A text view displays multiple lines of text
图8-12 一个文本视图显示多行文本

ui_textview.jpg

Although you might use a text view to display many lines of text, such as the content of a large text document, you can also use a text view to support user editing. If you make a text view editable, a keyboard appears when the user taps inside the text view. The keyboard’s input method and layout are determined by the user’s language settings. When users tap the button labeled “.?123” (shown in Figure 8-12), the keyboard changes to facilitate the entry of numbers and punctuation. You can also specify different keyboard styles, depending on the type of content you expect users to enter. See “Text Fields” for a description of the styles you can use.

虽然你可以使用一个文本视图显示多行文本,如一个大文本文件的内容,你也可以使用文本视图以支持用户编辑。如果你使用可编辑的文本视图,当用户在文本视图点击时就会出现一个键盘。键盘的输入法和布局是由用户的语言设置决定的。当用户点击按钮“.?123”(如图8-12所示)时,键盘的发生改变以便于输入数字和标点符号。你也可以指定不同的键盘风格,这取决于你希望用户输入的文本类型。见“文本区域”有你可以参考的样式描述。

You have control over the font, color, and alignment of the text in a text view, but only as they apply to the entirety of the text. In other words, you can’t change any of these properties for only part of the text. The defaults for the font and color properties are, as you would expect, the system font and black, because they tend to be the most readable. The default for the alignment property is left (you can change this to center or right).

你可以在文本视图控制文字的字体,颜色和对齐方式,但它们只适用于文本的全部内容。换句话说,你不能改变某一部分文本的任何属性。文字的字体和颜色属性的默认值,如你所期望的,系统字体,黑色,因为他们往往是最可读的。对齐属性默认为左对齐(你可以更改为中心对齐或右对齐)。

If you must enable variable fonts, colors, or alignments within a view that displays text, you can use a web view instead of a text view, and style the text using HTML.

如果你必须要在一个视图,显示各种字体,颜色,或对齐方式的文本,你可以使用HTML 来控制文本而不是一个文本视图。

个人工具
名字空间
变换
动作
导航
工具箱