import SwiftUI
struct LandmarkList: View {
var body: some View {
NavigationView {
List(landmarks) { landmark in
NavigationLink {
LandmarkDetail(landmark: landmark)
} label: {
LandmarkRow(landmark: landmark)
}
}
.navigationTitle("Landmarks")
}
}
}
struct LandmarkList_Previews: PreviewProvider {
static var previews: some View {
ForEach(["iPhone SE (2nd generation)", "iPhone XS Max"], id: \.self) { deviceName in
LandmarkList()
.previewDevice(PreviewDevice(rawValue: deviceName))
}
}
}
ํ๋ฆฌ๋ทฐ๋ฅผ ์ฌ๋ฌ๊ฐ๋ฅผ ๋์์ ๋์ฐ๋ฉด
๊ฐ ๋๋ฐ์ด์ค์ ํ๋ฆฌ๋ทฐ๋ฅผ ํ์ธํ์ฌ ๋ ์ด์์์ด๋ ๋์์ธ์ด ์ด๋ป๊ฒ ๋ณด์ด๋์ง ๋ฏธ๋ฆฌ ํ์ธํ ์ ์๋ค.
ui ์์์ ๋ํ ์ผํ ์์น๋ฅผ ๊ฐ ๋๋ฐ์ด์ค์์ ํ์ ํ๋ ๋ฐ์ ์ ์ฉํ๊ฒ ์ฌ์ฉํ ์ ์์ ๊ฒ ๊ฐ๋ค.
๋ฐ์ํ
๋๊ธ