MihaelIsaev / UIKitPlus

🏰 Declarative UIKit with LivePreview for iOS9+ (best alternative to SwiftUI)
MIT License
596 stars 35 forks source link

fillEqually not work when use ForEach in UVStack #31

Open EkkoG opened 2 years ago

EkkoG commented 2 years ago

This works well

        view.body {
            UVStack {
                UView().background(.random)
                UView().background(.random)
                UView().background(.random)
            }.edgesToSuperview().alignment(.fill).distribution(.fillEqually)
        }

Simulator Screen Shot - iPhone 11 - 2022-04-19 at 00 41 09

This will not work.

        view.body {
            UVStack {
                UForEach([0, 1, 2]) { i in
                    UText("识别结果, \(i)").background(.random)
                }
            }.edgesToSuperview().alignment(.fill).distribution(.fillEqually)
        }

image

MihaelIsaev commented 2 years ago

@EkkoG this fix should work, please don't hesitate to re-open the issue if it doesn't

EkkoG commented 2 years ago

@MihaelIsaev Hello, 2.1.2 does not fix this issue. Same result as 2.1.1

EkkoG commented 2 years ago

And I can not reopen this issue because it was closed by you, not me.