Skip to content

Instantly share code, notes, and snippets.

@mishimay
Created April 19, 2022 07:23
Two columns in LazyVGrid by SwiftUI
import SwiftUI
struct ContentView: View {
var body: some View {
ScrollView {
LazyVGrid(columns: [.init(.flexible()), .init(.flexible())]) {
ForEach((0...79), id: \.self) {
let codepoint = $0 + 0x1f600
let emoji = String(Character(UnicodeScalar(codepoint)!))
Text("\(emoji)")
.font(.largeTitle)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment