One of the smaller SwiftUI improvements in iOS 27 makes a surprisingly big difference to the user experience.
If your app uses the textSelection(_:) modifier, users can now select only the portion of text they want, instead of being limited to actions on the entire Text view.
This change requires no code changes - your existing SwiftUI code automatically adopts the new behavior when running on iOS 27.
SwiftUI has supported selectable text for several releases through the textSelection(_:) modifier.
Text("""
SwiftUI makes it easy to build beautiful apps across Apple platforms.
""")
.textSelection(.enabled)That's all you need to make a Text view selectable.
Starting with iOS 27, touching and holding a selectable Text view now displays the familiar system text selection handles and selection highlight.
Users can:
This matches the text selection experience users expect throughout the system.
Context menu operates on the entire Text view.
Native text selection handles allow selecting a specific range.
| iOS 26 and Earlier | iOS 27 |
|---|---|
| Long press shows the system context menu immediately. | Long press enters text selection mode. |
Menu actions apply to the entire Text view. |
Users can select a specific range of text. |
| Partial text selection isn't supported. | Native range selection is fully supported. |
This improvement makes selectable text much more useful in apps that display larger blocks of content, such as:
Instead of copying an entire paragraph, users can now copy only the sentence, word, or code fragment they need.
The best part is that this enhancement is completely automatic.
If your app already uses:
.textSelection(.enabled)your app gains the improved selection behavior on iOS 27 without any additional code.
Apple Developer Documentation – textSelection(_:)
textSelection(_:) hasn't changed, but its behavior on iOS 27 has.
By bringing native range selection to SwiftUI Text views, Apple makes selectable text feel more consistent with the rest of the system and significantly improves usability for content-heavy apps.
If you've already enabled text selection in your app, your users will automatically benefit from this improvement when running on iOS 27.
Thank you for reading. If you have any questions feel free to follow me on X and send me a DM. If this article helped you, Buy me a coffee.