Samuel
@samuel.fm
how do you stop this completely random spacing from happening in SwiftUI
5 5
Samuel
how can I make sure that the post padding is always the same and that the max width of the post content is consistent. also the vertical padding seems to change which is weird
Samuel
they're in a list with a listStyle of .plain im not sure where a lot of the padding is coming from to be honest, which is probably why im making bad assumptions that don't hold up when there's stuff like the link cards
1 1
Kuba Suder 🇵🇱🇺🇦
Me neither 😅 I know some theory, but haven't written anything bigger yet. Looks like you don't have any paddings set on the outer stacks? If you want some padding from the screen edges/other cells, you should have something like this on the lvl1 or lvl2 stack: HStack() { ... } .padding(10)
1 1
Samuel
hmm so the list is giving it default padding then? so I just need to give it explicit padding?
1 1
Kuba Suder 🇵🇱🇺🇦
I'm not sure what the list is adding here… maybe try the old trick with adding .background(.red/blue/green) to all rectangles everywhere to see which whitespace comes from where :D
1 2
hailey
AFAIK the stacks shrink similar to how they would without flexbox. Try setting the width of the stack to 100% and see what happens
1 1