Is there a (coming?) property or an easy way to get the text vertically centered ?
TextEditor: Get text vertically centered
You can:
Code Block struct ContentView: View { @State var text: String = "" var body: some View { TextEditor(text: self.$text) .multilineTextAlignment(.center) } }
@joachim_me
It centers the text horizontally only.
It centers the text horizontally only.
@mohamedfromparis: I'm sorry, I read it too fast! I don't know, what you want to achieve exactly. What will be before the text? Line breaks? If not, what will happen if you type in your text and then create a new line? Will your TextEditor resize?