import SwiftUI
struct SectionListDemo: View {
var body: some View {
List {
Section(header: Text("Fruits"), footer: Text("End Fruits")) {
Text("Apple"); Text("Banana")
}
Section(header: Text("Veggies")) { Text("Carrot") }
}
}
}
import SwiftUI
struct ContentView: View {
var body: some View { SectionListDemo() }
}
import SwiftUI
@main
struct MyApp: App {
var body: some Scene { WindowGroup { ContentView() } }
}