TextField vs TextEditor on iOS16

Hi,

Since iOS16 TextField can take multi-line text input.

Is there any reason to still use TextEditor instead of it? Can we fully replace TextEditor with TextField?

Especially as we have encountered some bug in TextEditor combined with non-zero line spacing. If you input some text followed by rapidly typing a dozen of new lines, it becomes glitched. This bug is present since iOS16.

BR, KK

The recommendation is to still use TecEditor for large text. For smaller ones, TextField with multilimes is OK.

Get details here: https://useyourloaf.com/blog/swiftui-multi-line-text-fields/

As for the bug, you should file a bug report, including a video of the issue.

texteditor accepts newlines / line breaks (eg multi-paragraph text), textfield does not.

TextField vs TextEditor on iOS16
 
 
Q