How to create grid in SwiftUI

后端 未结 4 1800
孤街浪徒
孤街浪徒 2020-12-21 09:35

I know that we can create a List in vertical SwiftUI like this,

struct ContentView : View {
    var body: some View {
        NavigationView {
            Li         


        
4条回答
  •  被撕碎了的回忆
    2020-12-21 10:00

    iOS 14

    There is 2 new native Views that you can use:

    1. LazyHGrid

    2. LazyVGrid

    With code or directly from the library:

    The library contains a fully working sample code that you can test yourself.

提交回复
热议问题