Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
329 views
in Technique[技术] by (71.8m points)

ios - Create mixture LazyVGrid and List

Is there a possibility to have a mixture of LazyVGrid and a List, with alternating two Grid items and two List items for example?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
struct ContentView: View {
    var body: some View {
        List{
            LazyVGrid(columns: [GridItem(.flexible()), GridItem(.flexible())], content: {
                Text("Placeholder")
                Text("Placeholder")
            })
            Text("Text")
            Text("Text")
        }
    }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...