Skip to content

Instantly share code, notes, and snippets.

@mishimay
Created April 19, 2022 07:23
Show Gist options
  • Save mishimay/f724e328c29139c72ad28a09734b931d to your computer and use it in GitHub Desktop.
Save mishimay/f724e328c29139c72ad28a09734b931d to your computer and use it in GitHub Desktop.
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