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
aelfled13mo ago
simplest way is a VStack with Spacer
deme
demeOP13mo ago
I tried that but it didn't work sadly I'll paste a photo in a minute
deme
demeOP13mo ago
No description
deme
demeOP13mo ago
It is very weird
aelfled
aelfled13mo ago
No description
deme
demeOP13mo 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
demeOP13mo ago
No description
aelfled
aelfled13mo ago
using Spacer inside Form seems to work?
deme
demeOP13mo 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