UICollectionView and SwiftUI?

后端 未结 16 1445
时光说笑
时光说笑 2020-12-02 07:32

How to create grid of square items (for example like in iOS Photo Library) with SwiftUI?

I tried this approach but it doesn\'t work:

var body: some          


        
16条回答
  •  -上瘾入骨i
    2020-12-02 07:41

    Checkout ZStack based example here

    Grid(0...100) { _ in
        Rectangle()
            .foregroundColor(.blue)
    }
    

提交回复
热议问题