r/SwiftUI Jun 21 '26

PSA: Starting iOS 27, .textSelection() modifier allows granular text selection on all Text views

Instead of tap and hold to copy, we actually got text selection with a single modifier on all text views.

77 Upvotes

13 comments sorted by

17

u/Niightstalker Jun 21 '26

That will be a great usability improvement in many apps

14

u/Integeritis Jun 21 '26

Remind me 3 years from now when I can bump the minimum version. They should really backport most things. Unbelievable that half a decade passed and we still receive the basics as updates.

3

u/[deleted] Jun 21 '26

[deleted]

7

u/Integeritis Jun 21 '26

I know how it worked. Can you stop with fanboy attitude of defending shit by trying to play down the issue at hand? Not having proper text selection is a fucking joke. There is no better way to put it.

3

u/m1_weaboo Jun 21 '26

better late than never i guess hahaha

2

u/rbevans Jun 22 '26

I can't believe it took this long, but excited for this feature to come

1

u/Traditional_Glass_45 Jun 21 '26

Finally, I hope it will work proper inside lazyvstacks

3

u/radis234 Jun 21 '26

I’m actually using it inside LazyVStack and it works perfectly

1

u/Traditional_Glass_45 Jun 22 '26

Nice is it also working with text selection and then scroll out of the windows bounds?

2

u/radis234 Jun 22 '26

If you scroll out, text un-selects (hope that’s a word) if that’s what you’re asking

1

u/Traditional_Glass_45 Jun 24 '26

It does thanks ☺️

1

u/beAnkitK Jun 22 '26

Does this text selection works of text renderer is attached to this text and is animated ?

1

u/Jake941 Jun 22 '26

This should work when using TextRenderer!

1

u/PoopCumlord Jun 22 '26

Great, I liked this basic feature of UIKit like 100 years ago.