MihaelIsaev / UIKitPlus

🏰 Declarative UIKit with LivePreview for iOS9+ (best alternative to SwiftUI)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fillEqually not work when use ForEach in UVStack

EkkoG opened this issue · comments

commented

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 this fix should work, please don't hesitate to re-open the issue if it doesn't

commented

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

commented

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