Created
March 11, 2024 23:09
-
-
Save takoikatakotako/42f3882acd1823e0699fb94231497325 to your computer and use it in GitHub Desktop.
SwiftUIでListを使ってセクションごとに表示する
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 { | |
| List { | |
| Section("Normal") { | |
| Text("Meowth") | |
| Text("Ditto") | |
| } | |
| Section("Fire") { | |
| Text("Vulpix") | |
| Text("Arcanine") | |
| Text("Charmander") | |
| } | |
| } | |
| .listStyle(.grouped) | |
| } | |
| } | |
| #Preview { | |
| ContentView() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment