TextView
Render selectable rich text and command-backed links.
TextView renders read-only rich text from Span and Link values. Unlike Label, it can make text selectable and can attach native actions and menus to individual links.
Use Label for ordinary read-only text that does not need selection or link actions.
A plain string can be added to the spans collection where an unstyled run is sufficient. Each Span may override the base font size, weight, design, color, underline, or strikethrough settings.
Links
Link derives from Span and adds a Command, optional CommandParameter, and menu actions. Its command becomes the native primary action for that text range. A link automatically makes the underlying text view selectable because UIKit requires selection for interactive text items.
Use LinkColor to set a shared link color; leave it unset to use the app tint. Keep link wording descriptive because the same text is exposed to accessibility features and native interaction menus.
Selection and updates
Set IsSelectable when ordinary spans should be copyable. MaxLines, TextAlignment, LineSpacing, and LetterSpacing behave much like their Label counterparts.
Spans is live when backed by an observable collection:
Replacing or changing the span list rebuilds the attributed text rather than animating between runs.