How can I draw a text on the side of a UITextview
Asked on 06/19/2025
1 search
To draw text on the side of a UITextView
, you can utilize the new text formatting features introduced in UIKit. Specifically, you can customize the text formatting panel by setting a custom UITextFormattingViewControllerConfiguration
using the UITextView
's new text formatting configuration property. This allows you to tailor the presentation of the panel and apply text highlight styles and color schemes.
For more detailed information on text improvements in UIKit, you can refer to the session What’s new in UIKit (16:14).
If you are interested in custom text drawing possibilities, you might also want to explore the session Create custom visual effects with SwiftUI (12:49), which discusses customizing how SwiftUI text is drawn, including animation and custom text rendering.

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.

Create custom visual effects with SwiftUI
Discover how to create stunning visual effects in SwiftUI. Learn to build unique scroll effects, rich color treatments, and custom transitions. We’ll also explore advanced graphic effects using Metal shaders and custom text rendering.

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.