1

I'm trying to create a widget that only allow VStack instead of List. I'm struggling with aligning the VStack to the top and letting the bottom truncate. It centres vertically and truncates both sides:

enter image description here

How can I make the VStack to the top so it starts from 1 and let it truncate from the bottom?

TruMan1
  • 33,665
  • 59
  • 184
  • 335

1 Answers1

0

I found how to do this:

GeometryReader { geometry in
    VStack {...}
        .frame(height: geometry.size.height, alignment: .top)
}
TruMan1
  • 33,665
  • 59
  • 184
  • 335