Created
April 19, 2022 07:23
-
-
Save mishimay/f724e328c29139c72ad28a09734b931d to your computer and use it in GitHub Desktop.
Two columns in LazyVGrid by SwiftUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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