Why VStack has different behavior between iOS13 and iOS14?

207 views Asked by At

In iOS13 VStack align its content center along the vertical direction, like this:

enter image description here

In iOS14 VStack align its content top along the vertical direction:

enter image description here

I use same code as below,

GeometryReader { geometry in
    VStack(alignment: .leading, spacing: 0) {
        ForEach(0 ..< 100) { i in
            Text("Row \(i)").foregroundColor(.white)
        }
    }
}

How to make the VStack align its top edge in iOS13?

0

There are 0 answers