How can I scroll to TextEditor cursor position in SwiftUI
TextEditor scroll to selection
Thanks for your question and post. I hope I can understand exactly what you mean by scrolling.
Do you mean scrolling inside a Text? Scrolling to the cursor position in a TextEditor in SwiftUI? Or like with UITextView in UIKit? Do you mean scrolling to a specific part of the text?
// Something like this?
TextEditor(text: \$text)
.background(
GeometryReader { geometry -> Color in
(...)
)
To provide a more accurate response, I would appreciate it if you could provide additional context and some code snippets. This will enable us to understand your specific requirements and the exact functionality you are seeking to achieve.
Albert Pascual Worldwide Developer Relations.