[Swift] how to create multiple preview

    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 ์š”์†Œ์˜ ๋””ํ…Œ์ผํ•œ ์œ„์น˜๋ฅผ ๊ฐ ๋””๋ฐ”์ด์Šค์—์„œ ํŒŒ์•…ํ•˜๋Š” ๋ฐ์— ์œ ์šฉํ•˜๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™๋‹ค. 

    ๋ฐ˜์‘ํ˜•

    ๋Œ“๊ธ€