Can I use text effects in iOS 17?

Generated on 8/3/2024

1 search

Yes, you can use text effects in iOS 17. There are several new features and improvements related to text effects across different sessions at WWDC 2024:

  1. SwiftUI Enhancements:

    • You can extend SwiftUI text views with custom rendering effects and interaction behaviors. For example, you can build a word highlighting effect for karaoke lyrics, making the text look like it's glowing purple. This is demonstrated in the session What’s new in SwiftUI.
  2. Custom Visual Effects with SwiftUI:

    • The new text attribute protocol introduced alongside text renderer in iOS 18 allows for creating custom visual effects. By implementing this protocol, you can pass data from your text to your text renderer and apply custom attributes to specific ranges of text. This is covered in the session Create custom visual effects with SwiftUI.
  3. UIKit Text Improvements:

    • iOS 18 introduces a new text formatting panel that provides a consistent and customizable experience for apps that offer text formatting options. This includes a new text highlight feature that works by applying two new texthighlightstyle attributes. This is detailed in the session What’s new in UIKit.
  4. AppKit Text Highlighting:

    • macOS Sequoia introduces new text highlighting features controlled by attributed string attributes. The texthighlight attribute corresponds to a texthighlightstyle, which can be set to system default to indicate that a range of text should be highlighted. This is explained in the session What’s new in AppKit.

These sessions provide comprehensive insights into how you can leverage new text effects and formatting capabilities in iOS 17 and other aligned releases.