A text view displays multiline, styled text content. Text views can be any height and enable scrolling when the content extends outside of the view. By default, content within a text view is left-aligned and uses the system font in black. If a text view is editable, a keyboard appears when you tap inside the view.
    文本视图用来显示多行富文本内容。文本视图可以是任何高度,当内容扩展到视图之外时可以启用滚动。默认情况下,文本视图中的内容是左对齐的,并使用黑色的系统字体。如果一个文本视图是可编辑的,在视图内点击时,键盘就会出现。
    文本视图(Text Views) - 图1
    Keep text legible. Although you can use multiple fonts, colors, and alignments in creative ways, it’s essential to maintain the readability of your content. It’s a good idea to adopt Dynamic Type so your text still looks good if people change text size on their device. You should also test your content with accessibility options enabled, such as bold text. See Accessibility.
    Show the appropriate keyboard type. iOS provides several different keyboard types, each designed to facilitate a different type of input. To streamline data entry, the keyboard displayed during the editing of a text view should be appropriate for the type of content in the field. For a complete list of available keyboard types, see the UIKeyboardType constant of UITextInputTraits.

    保持文本清晰易读。尽管可以使用多种创意字体、颜色或对齐方式,但保持内容的可读性至关重要。采用自定义字号是一个好主意,这样当人们在他们的设备上改变文本大小时,你的文本会依旧看起来很易读。您还应该在启用可访问性选项(如粗体)的情况下测试内容。
    显示合适的键盘类型。iOS提供了几种不同的键盘类型,每一种都是为了方便不同类型的输入。为了简化数据输入,编辑态文本视图显示的键盘应该匹配输入域的内容类型。