3

Is there a way to easy select all text inside a TextField in SwiftUI, I tried all results in the post here (Select all text in TextField upon click SwiftUI), but none is working.

Any more suggestions?

ldo1985
  • 115
  • 6
  • 1
    What isn’t working about them? There is no SwiftUI way of doing this you need UIKit – lorem ipsum Mar 27 '23 at 12:36
  • Does this answer your question? [Select all text in TextField upon click SwiftUI](https://stackoverflow.com/questions/67502138/select-all-text-in-textfield-upon-click-swiftui) –  Mar 27 '23 at 14:05
  • All of the answers in this link do not solve the problem on the TexField SWIFTUI component. They are either accessing global responders or just wrapping UIKit. Ideally Apple should provide a way to do this easily in the new TextField element without having to fallback to UIKit, otherwise we are adopting swiftUI to just keep using UIKIt. https://stackoverflow.com/questions/75855705/textfield-select-all-text-in-swiftui – Barbara R Jul 10 '23 at 10:20

0 Answers0