Contents

Text input and output

Display formatted text and get text input from the user.

Overview

To display read-only text, or read-only text paired with an image, use the built-in Text or Label views, respectively. When you need to collect text input from the user, use an appropriate text input view, like TextField or TextEditor.

[Image]

You add view modifiers to control the text’s font, selectability, alignment, layout direction, and so on. These modifiers also affect other views that display text, like the labels on controls, even if you don’t define an explicit Text view.

For design guidance, see Typography in the Human Interface Guidelines.

Topics

Displaying text

Getting text input

Selecting text

Setting a font

Adjusting text size

Controlling text style

Managing text layout

Rendering text

Limiting line count for multiline text

Formatting multiline text

Formatting date and time

Managing text entry

Dictating text

Configuring the Writing Tools behavior

Specifying text equivalents

Localizing text

Deprecated types

See Also

Views