how are the new text view apis used
Asked on 06/15/2025
1 search
The new text view APIs introduced at WWDC are designed to enhance text editing experiences across different Apple platforms. Here are some key features and how they are used:
-
Text Highlighting: In UIKit, the new text view APIs allow for text highlighting using
texthighlightstyle
andtexthighlight color scheme
. There are predefined color schemes, and you can customize the formatting panel using theuitextview's
new text formatting configuration property. This is discussed in the What’s new in UIKit session. -
Writing Tools: The Writing Tools feature provides advanced text editing capabilities, including inline editing, proofreading, and composition support. New delegate methods and properties are introduced for
uitextview
andNXT view
to manage these tools. This is covered in the Get started with Writing Tools session. -
Rich Text Editing in SwiftUI: SwiftUI now supports rich text editing with
AttributedString
. You can pass a binding to anAttributedString
into aText Editor
to enable rich text features. This is highlighted in the What’s new in SwiftUI session. -
Custom Text Engines: For custom text engines, the Writing Tools Coordinator API allows for managing interactions between your view and writing tools. This includes handling animations, proofreading marks, and state changes. This is detailed in the Dive deeper into Writing Tools session.
These APIs provide a robust framework for enhancing text editing capabilities in your apps, whether you're using UIKit, SwiftUI, or custom text engines.

What’s new in UIKit
Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.

Get started with Writing Tools
Learn how Writing Tools help users proofread, rewrite, and transform text in your app. Get the details on how Writing Tools interact with your app so users can refine what they have written in any text view. Understand how text is retrieved and processed, and how to support Writing Tools in custom text views.

What’s new in SwiftUI
Learn what’s new in SwiftUI to build great apps for any Apple platform. We’ll explore how to give your app a brand new look and feel with Liquid Glass. Discover how to boost performance with framework enhancements and new instruments, and integrate advanced capabilities like web content and rich text editing. We’ll also show you how SwiftUI is expanding to more places, including laying out views in three dimensions.