UIKitPlus icon indicating copy to clipboard operation
UIKitPlus copied to clipboard

fillEqually not work when use ForEach in UVStack

Open EkkoG opened this issue 3 years ago • 3 comments

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

EkkoG avatar Apr 18 '22 16:04 EkkoG

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

MihaelIsaev avatar Apr 19 '22 11:04 MihaelIsaev

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

EkkoG avatar Apr 19 '22 14:04 EkkoG

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

EkkoG avatar Apr 19 '22 14:04 EkkoG