textkit
Asked on 2024-07-30
2 searches
TextKit is a powerful framework used for text handling in iOS, macOS, and other Apple platforms. It is integrated into various text views across different frameworks like SwiftUI, UIKit, and AppKit. Here are some key points about TextKit and its usage:
-
Multilingual Support:
- TextKit 2 ensures that text in any of the user's preferred languages renders correctly in any app. This is particularly useful for multilingual apps where text needs to be displayed beautifully regardless of the language. For example, in the session Build multilingual-ready apps, it is mentioned how TextKit 2 handles Urdu text appropriately without any specific code for Urdu.
-
Writing Tools Integration:
- Writing tools are a new suite of features available in text fields across all kinds of apps, helping users to proofread, rewrite, or transform text. These tools are integrated with TextKit 2 to provide a seamless experience. For more details, you can refer to the session Get started with Writing Tools.
-
Text Interactions:
- TextKit 2 supports various text interactions, including text selection, editing, and formatting. For instance, the session Get started with Writing Tools discusses how custom text views can adopt
UITextInteractionto get writing tools in the color bar or context menu for free.
- TextKit 2 supports various text interactions, including text selection, editing, and formatting. For instance, the session Get started with Writing Tools discusses how custom text views can adopt
-
Text Formatting:
- The session What’s new in UIKit introduces new text formatting features, including text highlight styles and color schemes, which are part of the enhancements in TextKit 2.
For more detailed information, you can explore the following sessions:
These sessions cover various aspects of TextKit, including its integration with writing tools, multilingual support, and new text formatting capabilities.

Build multilingual-ready apps
Ensure your app works properly and effectively for multilingual users. Learn best practices for text input, display, search, and formatting. Get details on typing in multiple languages without switching between keyboards. And find out how the latest advances in the String Catalog can make localization even easier.

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 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.
