1

In SwiftUI, you can dynamically size a TextField like this which expands vertically as the user types.

TextField("Enter text", text: $text, axis: .vertical)

I would like to do the same thing using a TextEditor, especially now that it supports AttributedString in iOS 26.

Is there a built-in way to get dynamic height sizing for TextEditor, similar to axis: .vertical?

If not, what is the correct modern approach?

2
  • Does this iOS 14+ works for you? (the Dynamic growing height part) Commented Nov 17 at 11:45
  • You're going to have to provide a minimum reproducible example. Commented Nov 17 at 15:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.