Centering in Swift
Hi, everyone. I am having trouble with creation of SwiftUI ui's. I have a Form and I want to center it vertically. How can I do this? Thanks in advance.
9 Replies
simplest way is a
VStack
with Spacer
I tried that but it didn't work
sadly
I'll paste a photo in a minute

It is very weird

Oh, I get it. Form is taking all the height and there is no place for Spacers
But now the coloring is wrong

using
Spacer
inside Form
seems to work?Yes, it did
Form was taking all the space
And there was no space left for spacers
That's why it wasn't working