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
aelfled
aelfled12mo ago
simplest way is a VStack with Spacer
deme
deme12mo ago
I tried that but it didn't work sadly I'll paste a photo in a minute
deme
deme12mo ago
No description
deme
deme12mo ago
It is very weird
aelfled
aelfled12mo ago
No description
deme
deme12mo ago
Oh, I get it. Form is taking all the height and there is no place for Spacers But now the coloring is wrong
deme
deme12mo ago
No description
aelfled
aelfled12mo ago
using Spacer inside Form seems to work?
deme
deme12mo ago
Yes, it did Form was taking all the space And there was no space left for spacers That's why it wasn't working
Want results from more Discord servers?
Add your server