// MainView.swift
// MySwiftLearning1
//
// Created by Arifur Rahman Jerin on 4/30/21.
//
import SwiftUI
struct Pizzeria: View {
let name: String
var body: some View {
Text(“Restaurant: \(name)“)
}
}
struct MainView: View {
var body: some View {
List {
Section(header: Text(“Examples”)) {
Pizzeria(name: “Joe’s Original”)
Pizzeria(name: “The Real Joe’s Original”)
Pizzeria(name: “Original Joe’s”)
}
}
.listStyle(GroupedListStyle())
}
}
// MainView.swift
// MySwiftLearning1
//
// Created by Arifur Rahman Jerin on 4/30/21.
//
import SwiftUI
struct Pizzeria: View {
let name: String
var body: some View {
Text(“Restaurant: \(name)“)
}
}
struct MainView: View {
var body: some View {
List {
Section(header: Text(“Examples”)) {
Pizzeria(name: “Joe’s Original”)
Pizzeria(name: “The Real Joe’s Original”)
Pizzeria(name: “Original Joe’s”)
}
}
.listStyle(InsetGroupedListStyle())
}
}
There are 0 comments